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/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-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/AcontainsTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..b336ed228d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferCbufferLogicalFunction.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 AcontainsTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcontainsTcbufferCbuffer"; + + AcontainsTcbufferCbufferLogicalFunction(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/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/AcoversGeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversGeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..8eefa14800 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversGeoTgeoLogicalFunction.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 acovers_geo_tgeo. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_geo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcoversGeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversGeoTgeo"; + + AcoversGeoTgeoLogicalFunction(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/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/AcoversTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..631a12a629 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversTcbufferCbufferLogicalFunction.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 AcoversTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversTcbufferCbuffer"; + + AcoversTcbufferCbufferLogicalFunction(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/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/AdisjointTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..9030963081 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferCbufferLogicalFunction.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 AdisjointTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTcbufferCbuffer"; + + AdisjointTcbufferCbufferLogicalFunction(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/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/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/AintersectsTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..7820228031 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferCbufferLogicalFunction.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 AintersectsTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTcbufferCbuffer"; + + AintersectsTcbufferCbufferLogicalFunction(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/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/AlwaysEqQuadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqQuadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..b0405e64b8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqQuadbinTquadbinLogicalFunction.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_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_quadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqQuadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqQuadbinTquadbin"; + + AlwaysEqQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + 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/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/AlwaysEqTquadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTquadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..e46472ab35 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTquadbinTquadbinLogicalFunction.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_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tquadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTquadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTquadbinTquadbin"; + + AlwaysEqTquadbinTquadbinLogicalFunction(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/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/AlwaysNeQuadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeQuadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..bbe2529326 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeQuadbinTquadbinLogicalFunction.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_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_quadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeQuadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeQuadbinTquadbin"; + + AlwaysNeQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + 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/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/AlwaysNeTquadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTquadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..9ef40a6d0c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTquadbinTquadbinLogicalFunction.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_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tquadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTquadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTquadbinTquadbin"; + + AlwaysNeTquadbinTquadbinLogicalFunction(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/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/AtouchesTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..61ce36445d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferCbufferLogicalFunction.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 AtouchesTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTcbufferCbuffer"; + + AtouchesTcbufferCbufferLogicalFunction(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/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/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/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/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/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/EcontainsTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..669ebe0914 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferCbufferLogicalFunction.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 EcontainsTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcontainsTcbufferCbuffer"; + + EcontainsTcbufferCbufferLogicalFunction(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/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/EcoversTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..4c5c86983d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversTcbufferCbufferLogicalFunction.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 EcoversTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversTcbufferCbuffer"; + + EcoversTcbufferCbufferLogicalFunction(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/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/EdisjointTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..84ee91970e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferCbufferLogicalFunction.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 EdisjointTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTcbufferCbuffer"; + + EdisjointTcbufferCbufferLogicalFunction(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/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/EintersectsTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..5a860466e7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferCbufferLogicalFunction.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 EintersectsTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTcbufferCbuffer"; + + EintersectsTcbufferCbufferLogicalFunction(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/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/EintersectsTpcpointGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTpcpointGeoLogicalFunction.hpp new file mode 100644 index 0000000000..f57275bed8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTpcpointGeoLogicalFunction.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-intersects predicate for a tpcpoint instant and a geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}bool _r=eintersects_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r?1.0:0.0;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EintersectsTpcpointGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTpcpointGeo"; + + EintersectsTpcpointGeoLogicalFunction(LogicalFunction pt_hexwkb, + 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/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/EtouchesTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..66032f134c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferCbufferLogicalFunction.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 EtouchesTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTcbufferCbuffer"; + + EtouchesTcbufferCbufferLogicalFunction(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/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/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/EverEqQuadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqQuadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..708fee5538 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqQuadbinTquadbinLogicalFunction.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_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_quadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqQuadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqQuadbinTquadbin"; + + EverEqQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + 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/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/EverEqTquadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTquadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..c37f1a4442 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTquadbinTquadbinLogicalFunction.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_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tquadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTquadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTquadbinTquadbin"; + + EverEqTquadbinTquadbinLogicalFunction(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/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/EverNeQuadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeQuadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..ba06357334 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeQuadbinTquadbinLogicalFunction.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_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_quadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeQuadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeQuadbinTquadbin"; + + EverNeQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + 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/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/EverNeTquadbinTquadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTquadbinTquadbinLogicalFunction.hpp new file mode 100644 index 0000000000..0dde8fff72 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTquadbinTquadbinLogicalFunction.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_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tquadbin_tquadbin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTquadbinTquadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTquadbinTquadbin"; + + EverNeTquadbinTquadbinLogicalFunction(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/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/FloatspanMakeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FloatspanMakeLogicalFunction.hpp new file mode 100644 index 0000000000..7b7b3224fe --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FloatspanMakeLogicalFunction.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 Construct a float span from bounds and inclusivity flags. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({Span* _sp=floatspan_make(lower,upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=floatspan_out(_sp,-1);free(_sp);_out;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FloatspanMakeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FloatspanMake"; + + FloatspanMakeLogicalFunction(LogicalFunction lower, + LogicalFunction upper, + LogicalFunction lower_inc, + LogicalFunction upper_inc); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/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/GeoAsHexewkbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoAsHexewkbLogicalFunction.hpp new file mode 100644 index 0000000000..94b606a819 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoAsHexewkbLogicalFunction.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 Encode geometry as hex-EWKB. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(wktPtr,wktSize),_es(endianPtr,endianSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;char* _out=geo_as_hexewkb(_gs,_es.c_str());free(_gs);_out;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoAsHexewkbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoAsHexewkb"; + + GeoAsHexewkbLogicalFunction(LogicalFunction wkt, + LogicalFunction endian); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/GeoFromGeojsonLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoFromGeojsonLogicalFunction.hpp new file mode 100644 index 0000000000..74a7241f9a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoFromGeojsonLogicalFunction.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 Deserialise GeoJSON string to geometry WKT. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_from_geojson(std::string(jsonPtr,jsonSize).c_str())`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoFromGeojsonLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoFromGeojson"; + + GeoFromGeojsonLogicalFunction(LogicalFunction json); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/GeoTransformPipelineLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoTransformPipelineLogicalFunction.hpp new file mode 100644 index 0000000000..f3a720f2a7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoTransformPipelineLogicalFunction.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 Transform geometry through a coordinate pipeline. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(wktPtr,wktSize),_ps(pipelinePtr,pipelineSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geo_transform_pipeline(_gs,const_cast(_ps.c_str()),(int32_t)srid_to,(bool)is_forward);free(_gs);_res;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoTransformPipelineLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoTransformPipeline"; + + GeoTransformPipelineLogicalFunction(LogicalFunction wkt, + LogicalFunction pipeline, + LogicalFunction srid_to, + LogicalFunction is_forward); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/GeomBufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomBufferLogicalFunction.hpp new file mode 100644 index 0000000000..75c4578f96 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomBufferLogicalFunction.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 Compute the buffer zone around a geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(wktPtr,wktSize),_ps(paramsPtr,paramsSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geom_buffer(_gs,size,_ps.c_str());free(_gs);_res;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomBufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomBuffer"; + + GeomBufferLogicalFunction(LogicalFunction wkt, + LogicalFunction size, + LogicalFunction params); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/GeomFromHexewkbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomFromHexewkbLogicalFunction.hpp new file mode 100644 index 0000000000..31efcf42eb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomFromHexewkbLogicalFunction.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 Decode hex-EWKB string to geometry WKT. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_from_hexewkb(std::string(hexPtr,hexSize).c_str())`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomFromHexewkbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomFromHexewkb"; + + GeomFromHexewkbLogicalFunction(LogicalFunction hex); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/GeomMinBoundingCenterLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomMinBoundingCenterLogicalFunction.hpp new file mode 100644 index 0000000000..15cad6f5fa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomMinBoundingCenterLogicalFunction.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 Centre of the minimum bounding circle of a geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);free(_gs);_mbc.center;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomMinBoundingCenterLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomMinBoundingCenter"; + + GeomMinBoundingCenterLogicalFunction(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/GeomMinBoundingRadiusLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomMinBoundingRadiusLogicalFunction.hpp new file mode 100644 index 0000000000..9d265323c7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomMinBoundingRadiusLogicalFunction.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 Radius of the minimum bounding circle of a geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0.0;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);double _r=_mbc.radius;if(_mbc.center)free(_mbc.center);free(_gs);_r;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomMinBoundingRadiusLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomMinBoundingRadius"; + + GeomMinBoundingRadiusLogicalFunction(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/GeomRelatePatternLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomRelatePatternLogicalFunction.hpp new file mode 100644 index 0000000000..27d8d4492e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomRelatePatternLogicalFunction.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 Test DE-9IM relation pattern between two geometries. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s1(wkt1Ptr,wkt1Size),_s2(wkt2Ptr,wkt2Size),_sp(patternPtr,patternSize);GSERIALIZED* _gs1=geom_in(_s1.c_str(),-1);if(!_gs1)return 0.0;GSERIALIZED* _gs2=geom_in(_s2.c_str(),-1);if(!_gs2){free(_gs1);return 0.0;}bool _r=geom_relate_pattern(_gs1,_gs2,const_cast(_sp.c_str()));free(_gs1);free(_gs2);_r?1.0:0.0;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomRelatePatternLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomRelatePattern"; + + GeomRelatePatternLogicalFunction(LogicalFunction wkt1, + LogicalFunction wkt2, + LogicalFunction pattern); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/H3GsPointToCellLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3GsPointToCellLogicalFunction.hpp new file mode 100644 index 0000000000..7df049b105 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3GsPointToCellLogicalFunction.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 Map (lon,lat) point to H3 cell at given resolution. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _wkt=fmt::format("SRID=4326;POINT({} {})",lon,lat);GSERIALIZED* _gs=geom_in(_wkt.c_str(),-1);if(!_gs)return 0u;H3Index _cell=h3_gs_point_to_cell(_gs,(int32_t)res);free(_gs);_cell;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3GsPointToCellLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3GsPointToCell"; + + H3GsPointToCellLogicalFunction(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/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/H3indexInLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexInLogicalFunction.hpp new file mode 100644 index 0000000000..09ed300fd9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexInLogicalFunction.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 Parse H3 cell index from a hex string. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `(uint64_t)h3index_in(std::string(hexPtr,hexSize).c_str())`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexInLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexIn"; + + H3indexInLogicalFunction(LogicalFunction hex); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/IntersectLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntersectLogicalFunction.hpp deleted file mode 100644 index 40ee8677d0..0000000000 --- a/nes-logical-operators/include/Functions/Meos/IntersectLogicalFunction.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 -#include -#include -#include - -namespace NES -{ -class IntersectLogicalFunction final : public LogicalFunctionConcept -{ -public: - static constexpr std::string_view NAME = "And"; - - IntersectLogicalFunction(LogicalFunction lon, LogicalFunction lat, LogicalFunction ts); - - [[nodiscard]] SerializableFunction serialize() const override; - - [[nodiscard]] bool operator==(const LogicalFunctionConcept& rhs) const override; - - // Spatial-temporal intersection method - [[nodiscard]] bool spatialIntersects(const double lon, const double lat, const double ts) const; - - [[nodiscard]] DataType getDataType() const override; - [[nodiscard]] LogicalFunction withDataType(const DataType& dataType) const override; - [[nodiscard]] LogicalFunction withInferredDataType(const Schema& schema) const override; - - [[nodiscard]] std::vector getChildren() const override; - [[nodiscard]] LogicalFunction withChildren(const std::vector& children) const override; - - [[nodiscard]] std::string_view getType() const override; - [[nodiscard]] std::string explain(ExplainVerbosity verbosity) const override; - -private: - DataType dataType; - LogicalFunction lon, lat, ts; -}; - -} -FMT_OSTREAM(NES::IntersectLogicalFunction); 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/IntspanMakeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntspanMakeLogicalFunction.hpp new file mode 100644 index 0000000000..5b47d088d6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/IntspanMakeLogicalFunction.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 Construct an integer span from bounds and inclusivity flags. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({Span* _sp=intspan_make((int)lower,(int)upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=intspan_out(_sp);free(_sp);_out;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class IntspanMakeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "IntspanMake"; + + IntspanMakeLogicalFunction(LogicalFunction lower, + LogicalFunction upper, + LogicalFunction lower_inc, + LogicalFunction upper_inc); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/JsonArrayElementTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonArrayElementTextLogicalFunction.hpp new file mode 100644 index 0000000000..9d52ee9e41 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonArrayElementTextLogicalFunction.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 Text value of a JSON array element at a given index. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_array_element_text(_js,(int)idx);free(_js);_res;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonArrayElementTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonArrayElementText"; + + JsonArrayElementTextLogicalFunction(LogicalFunction json, + LogicalFunction idx); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonArrayLengthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonArrayLengthLogicalFunction.hpp new file mode 100644 index 0000000000..971a91417f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonArrayLengthLogicalFunction.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 Number of elements in a JSON array. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0.0;int _n=json_array_length(_js);free(_js);(double)_n;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonArrayLengthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonArrayLength"; + + JsonArrayLengthLogicalFunction(LogicalFunction json); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonObjectFieldTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonObjectFieldTextLogicalFunction.hpp new file mode 100644 index 0000000000..aa01623694 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonObjectFieldTextLogicalFunction.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 Text value of a JSON object field by key. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _sj(jsonPtr,jsonSize),_sk(keyPtr,keySize);text* _js=json_in(_sj.c_str());if(!_js)return 0u;text* _key=cstring_to_text(_sk.c_str());text* _res=json_object_field_text(_js,_key);free(_js);free(_key);_res;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonObjectFieldTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonObjectFieldText"; + + JsonObjectFieldTextLogicalFunction(LogicalFunction json, + LogicalFunction key); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonTypeofLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonTypeofLogicalFunction.hpp new file mode 100644 index 0000000000..f6988fa305 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonTypeofLogicalFunction.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 Data type of the outermost JSON element. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_typeof(_js);free(_js);_res;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonTypeofLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonTypeof"; + + JsonTypeofLogicalFunction(LogicalFunction json); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& 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/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/NadTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..94f8905730 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTcbufferCbufferLogicalFunction.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. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTcbufferCbuffer"; + + NadTcbufferCbufferLogicalFunction(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/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/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/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/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/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/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/NadTpcpointGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTpcpointGeoLogicalFunction.hpp new file mode 100644 index 0000000000..8bdb8781f7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTpcpointGeoLogicalFunction.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 Nearest-approach distance for a tpcpoint instant and a geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}double _r=nad_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r;})`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTpcpointGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTpcpointGeo"; + + NadTpcpointGeoLogicalFunction(LogicalFunction pt_hexwkb, + 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/TeqFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..cd4a3f8a7c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqFloatTfloatLogicalFunction.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_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqFloatTfloat"; + + TeqFloatTfloatLogicalFunction(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/TeqIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..5e05d92752 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqIntTintLogicalFunction.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_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqIntTint"; + + TeqIntTintLogicalFunction(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/TeqTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..465b08f760 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqTemporalTemporalLogicalFunction.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 teq_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqTemporalTemporal"; + + TeqTemporalTemporalLogicalFunction(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..694476daad --- /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 Per-event teq_text_ttext. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_text_ttext`. 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/TeqTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..4e55cc2058 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqTfloatFloatLogicalFunction.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_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqTfloatFloat"; + + TeqTfloatFloatLogicalFunction(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/TeqTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..9b3903f8ee --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqTintIntLogicalFunction.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_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqTintInt"; + + TeqTintIntLogicalFunction(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/TeqTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..960b50b00d --- /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 Per-event teq_ttext_text. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_ttext_text`. 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/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/TfloatCosLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatCosLogicalFunction.hpp new file mode 100644 index 0000000000..2e8aa3a9fc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatCosLogicalFunction.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_cos. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_cos`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatCosLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatCos"; + + TfloatCosLogicalFunction(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/TfloatDegreesLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatDegreesLogicalFunction.hpp new file mode 100644 index 0000000000..a90c3e4d9c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatDegreesLogicalFunction.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_degrees. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_degrees`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatDegreesLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatDegrees"; + + TfloatDegreesLogicalFunction(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/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/TfloatSinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatSinLogicalFunction.hpp new file mode 100644 index 0000000000..6fc6024eb3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatSinLogicalFunction.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_sin. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_sin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatSinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatSin"; + + TfloatSinLogicalFunction(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/TfloatTanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatTanLogicalFunction.hpp new file mode 100644 index 0000000000..46a443ed07 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatTanLogicalFunction.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_tan. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_tan`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatTanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatTan"; + + TfloatTanLogicalFunction(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/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/TgeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..6da39fa775 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgeFloatTfloatLogicalFunction.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 tge_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgeFloatTfloat"; + + TgeFloatTfloatLogicalFunction(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/TgeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..c3bcc961fb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgeIntTintLogicalFunction.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 tge_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgeIntTint"; + + TgeIntTintLogicalFunction(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/TgeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..22d083e675 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgeTemporalTemporalLogicalFunction.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 tge_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgeTemporalTemporal"; + + TgeTemporalTemporalLogicalFunction(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/TgeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..b92c46f1eb --- /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 Per-event tge_text_ttext. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_text_ttext`. 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/TgeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..7db1d4b450 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgeTfloatFloatLogicalFunction.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 tge_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgeTfloatFloat"; + + TgeTfloatFloatLogicalFunction(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/TgeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..17a97d885c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgeTintIntLogicalFunction.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 tge_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgeTintInt"; + + TgeTintIntLogicalFunction(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/TgeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..34364b5a2c --- /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 Per-event tge_ttext_text. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_ttext_text`. 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/TgtFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..3c7c2d562b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgtFloatTfloatLogicalFunction.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 tgt_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgtFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgtFloatTfloat"; + + TgtFloatTfloatLogicalFunction(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/TgtIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..c4af2d8b2d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgtIntTintLogicalFunction.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 tgt_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgtIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgtIntTint"; + + TgtIntTintLogicalFunction(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/TgtTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..10aeaf08e9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgtTemporalTemporalLogicalFunction.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 tgt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgtTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgtTemporalTemporal"; + + TgtTemporalTemporalLogicalFunction(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/TgtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..02acf09e04 --- /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 Per-event tgt_text_ttext. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_text_ttext`. 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/TgtTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..c50f4c7ea2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgtTfloatFloatLogicalFunction.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 tgt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgtTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgtTfloatFloat"; + + TgtTfloatFloatLogicalFunction(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/TgtTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..7e76e436af --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TgtTintIntLogicalFunction.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 tgt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TgtTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TgtTintInt"; + + TgtTintIntLogicalFunction(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/TgtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TgtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..de82c6ef74 --- /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 Per-event tgt_ttext_text. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_ttext_text`. 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/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/TleFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..7968fdb754 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TleFloatTfloatLogicalFunction.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 tle_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TleFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TleFloatTfloat"; + + TleFloatTfloatLogicalFunction(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/TleIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..2b38c594e8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TleIntTintLogicalFunction.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 tle_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TleIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TleIntTint"; + + TleIntTintLogicalFunction(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/TleTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..a584d1879a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TleTemporalTemporalLogicalFunction.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 tle_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TleTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TleTemporalTemporal"; + + TleTemporalTemporalLogicalFunction(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/TleTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..66230bb4f4 --- /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 Per-event tle_text_ttext. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_text_ttext`. 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/TleTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..d9cbbb4a5a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TleTfloatFloatLogicalFunction.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 tle_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TleTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TleTfloatFloat"; + + TleTfloatFloatLogicalFunction(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/TleTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..9bfed1e0d1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TleTintIntLogicalFunction.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 tle_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TleTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TleTintInt"; + + TleTintIntLogicalFunction(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/TleTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TleTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..9497b5ea7e --- /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 Per-event tle_ttext_text. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_ttext_text`. 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/TltFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..3385509163 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TltFloatTfloatLogicalFunction.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 tlt_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TltFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TltFloatTfloat"; + + TltFloatTfloatLogicalFunction(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/TltIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..910c66f565 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TltIntTintLogicalFunction.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 tlt_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TltIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TltIntTint"; + + TltIntTintLogicalFunction(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/TltTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..5774f2e5ba --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TltTemporalTemporalLogicalFunction.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 tlt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TltTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TltTemporalTemporal"; + + TltTemporalTemporalLogicalFunction(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/TltTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..2c31a110ba --- /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 Per-event tlt_text_ttext. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_text_ttext`. 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/TltTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..97824a1433 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TltTfloatFloatLogicalFunction.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 tlt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TltTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TltTfloatFloat"; + + TltTfloatFloatLogicalFunction(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/TltTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..1d330e7e4b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TltTintIntLogicalFunction.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 tlt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TltTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TltTintInt"; + + TltTintIntLogicalFunction(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/TltTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TltTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..79ef4c840c --- /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 Per-event tlt_ttext_text. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_ttext_text`. 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/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/TneFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..84047367aa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneFloatTfloatLogicalFunction.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_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneFloatTfloat"; + + TneFloatTfloatLogicalFunction(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/TneIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..1bde0d267e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneIntTintLogicalFunction.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_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneIntTint"; + + TneIntTintLogicalFunction(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/TneTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..2ec7941664 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneTemporalTemporalLogicalFunction.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 tne_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneTemporalTemporal"; + + TneTemporalTemporalLogicalFunction(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/TneTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..1945e19970 --- /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 Per-event tne_text_ttext. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_text_ttext`. 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/TneTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..c70e778480 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneTfloatFloatLogicalFunction.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_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneTfloatFloat"; + + TneTfloatFloatLogicalFunction(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/TneTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..b9403d7ddb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneTintIntLogicalFunction.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_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneTintInt"; + + TneTintIntLogicalFunction(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/TneTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..aaebe2360f --- /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 Per-event tne_ttext_text. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_ttext_text`. 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/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/TnumberAbsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TnumberAbsLogicalFunction.hpp new file mode 100644 index 0000000000..acef3fc2cb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TnumberAbsLogicalFunction.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 tnumber_abs. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tnumber_abs`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TnumberAbsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TnumberAbs"; + + TnumberAbsLogicalFunction(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/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/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/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/AcontainsTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..f9bb4425a3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferCbufferLogicalFunction.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 +{ + +AcontainsTcbufferCbufferLogicalFunction::AcontainsTcbufferCbufferLogicalFunction(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 AcontainsTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcontainsTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcontainsTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcontainsTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AcontainsTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcontainsTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AcontainsTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcontainsTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcontainsTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcontainsTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcontainsTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AcontainsTcbufferCbufferLogicalFunction 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 AcontainsTcbufferCbufferLogicalFunction(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/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/AcoversGeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversGeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..a62509cc5e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversGeoTgeoLogicalFunction.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 +{ + +AcoversGeoTgeoLogicalFunction::AcoversGeoTgeoLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType AcoversGeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcoversGeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcoversGeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcoversGeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AcoversGeoTgeoLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcoversGeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcoversGeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcoversGeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcoversGeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcoversGeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversGeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AcoversGeoTgeoLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AcoversGeoTgeoLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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/AcoversTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..5ce52ac39e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversTcbufferCbufferLogicalFunction.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 +{ + +AcoversTcbufferCbufferLogicalFunction::AcoversTcbufferCbufferLogicalFunction(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 AcoversTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcoversTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcoversTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcoversTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AcoversTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcoversTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AcoversTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcoversTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcoversTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcoversTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AcoversTcbufferCbufferLogicalFunction 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 AcoversTcbufferCbufferLogicalFunction(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/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/AdisjointTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..88cae41112 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferCbufferLogicalFunction.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 +{ + +AdisjointTcbufferCbufferLogicalFunction::AdisjointTcbufferCbufferLogicalFunction(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 AdisjointTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdisjointTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdisjointTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdisjointTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AdisjointTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdisjointTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AdisjointTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdisjointTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdisjointTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdisjointTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AdisjointTcbufferCbufferLogicalFunction 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 AdisjointTcbufferCbufferLogicalFunction(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/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/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/AintersectsTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..c39023f812 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferCbufferLogicalFunction.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 +{ + +AintersectsTcbufferCbufferLogicalFunction::AintersectsTcbufferCbufferLogicalFunction(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 AintersectsTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AintersectsTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AintersectsTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AintersectsTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AintersectsTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AintersectsTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AintersectsTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AintersectsTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AintersectsTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AintersectsTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AintersectsTcbufferCbufferLogicalFunction 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 AintersectsTcbufferCbufferLogicalFunction(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/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/AlwaysEqQuadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqQuadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..c5b5d243dc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqQuadbinTquadbinLogicalFunction.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 +{ + +AlwaysEqQuadbinTquadbinLogicalFunction::AlwaysEqQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(cell1)); + parameters.push_back(std::move(ts1)); +} + +DataType AlwaysEqQuadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqQuadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqQuadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqQuadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqQuadbinTquadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqQuadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqQuadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqQuadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqQuadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqQuadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqQuadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqQuadbinTquadbinLogicalFunction 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 AlwaysEqQuadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/AlwaysEqTquadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTquadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..3e3d7f636f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTquadbinTquadbinLogicalFunction.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 +{ + +AlwaysEqTquadbinTquadbinLogicalFunction::AlwaysEqTquadbinTquadbinLogicalFunction(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 AlwaysEqTquadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTquadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTquadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTquadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AlwaysEqTquadbinTquadbinLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTquadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTquadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTquadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTquadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTquadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTquadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AlwaysEqTquadbinTquadbinLogicalFunction 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 AlwaysEqTquadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/AlwaysNeQuadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeQuadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..dc0b65f4d1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeQuadbinTquadbinLogicalFunction.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 +{ + +AlwaysNeQuadbinTquadbinLogicalFunction::AlwaysNeQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(cell1)); + parameters.push_back(std::move(ts1)); +} + +DataType AlwaysNeQuadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeQuadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeQuadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeQuadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeQuadbinTquadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeQuadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeQuadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeQuadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeQuadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeQuadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeQuadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeQuadbinTquadbinLogicalFunction 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 AlwaysNeQuadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/AlwaysNeTquadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTquadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..781545aac9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTquadbinTquadbinLogicalFunction.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 +{ + +AlwaysNeTquadbinTquadbinLogicalFunction::AlwaysNeTquadbinTquadbinLogicalFunction(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 AlwaysNeTquadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTquadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTquadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTquadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AlwaysNeTquadbinTquadbinLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTquadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTquadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTquadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTquadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTquadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTquadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AlwaysNeTquadbinTquadbinLogicalFunction 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 AlwaysNeTquadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/AtouchesTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..d124d3ddcd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferCbufferLogicalFunction.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 +{ + +AtouchesTcbufferCbufferLogicalFunction::AtouchesTcbufferCbufferLogicalFunction(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 AtouchesTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AtouchesTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AtouchesTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AtouchesTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AtouchesTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AtouchesTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AtouchesTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AtouchesTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AtouchesTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AtouchesTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AtouchesTcbufferCbufferLogicalFunction 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 AtouchesTcbufferCbufferLogicalFunction(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/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/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/CMakeLists.txt b/nes-logical-operators/src/Functions/Meos/CMakeLists.txt index 474ba11608..4307dd114f 100644 --- a/nes-logical-operators/src/Functions/Meos/CMakeLists.txt +++ b/nes-logical-operators/src/Functions/Meos/CMakeLists.txt @@ -10,11 +10,618 @@ # See the License for the specific language governing permissions and # limitations under the License. -add_plugin(Intersect LogicalFunction nes-logical-operators IntersectLogicalFunction.cpp) -#add_plugin(TemporalDWithin LogicalFunction nes-logical-operators TemporalDWithinFunction.cpp) add_plugin(TemporalIntersects LogicalFunction nes-logical-operators TemporalIntersectsFunction.cpp) add_plugin(TemporalIntersectsGeometry LogicalFunction nes-logical-operators TemporalIntersectsGeometryLogicalFunction.cpp) add_plugin(TemporalAIntersectsGeometry LogicalFunction nes-logical-operators TemporalAIntersectsGeometryLogicalFunction.cpp) 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(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(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(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(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(EcoversTcbufferTcbuffer LogicalFunction nes-logical-operators EcoversTcbufferTcbufferLogicalFunction.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(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(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(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(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(AcontainsTcbufferCbuffer LogicalFunction nes-logical-operators AcontainsTcbufferCbufferLogicalFunction.cpp) +add_plugin(AcoversTcbufferCbuffer LogicalFunction nes-logical-operators AcoversTcbufferCbufferLogicalFunction.cpp) +add_plugin(AdisjointTcbufferCbuffer LogicalFunction nes-logical-operators AdisjointTcbufferCbufferLogicalFunction.cpp) +add_plugin(AintersectsTcbufferCbuffer LogicalFunction nes-logical-operators AintersectsTcbufferCbufferLogicalFunction.cpp) +add_plugin(AtouchesTcbufferCbuffer LogicalFunction nes-logical-operators AtouchesTcbufferCbufferLogicalFunction.cpp) +add_plugin(EcontainsTcbufferCbuffer LogicalFunction nes-logical-operators EcontainsTcbufferCbufferLogicalFunction.cpp) +add_plugin(EcoversTcbufferCbuffer LogicalFunction nes-logical-operators EcoversTcbufferCbufferLogicalFunction.cpp) +add_plugin(EdisjointTcbufferCbuffer LogicalFunction nes-logical-operators EdisjointTcbufferCbufferLogicalFunction.cpp) +add_plugin(EintersectsTcbufferCbuffer LogicalFunction nes-logical-operators EintersectsTcbufferCbufferLogicalFunction.cpp) +add_plugin(EtouchesTcbufferCbuffer LogicalFunction nes-logical-operators EtouchesTcbufferCbufferLogicalFunction.cpp) +add_plugin(NadTcbufferCbuffer LogicalFunction nes-logical-operators NadTcbufferCbufferLogicalFunction.cpp) +add_plugin(AlwaysEqTquadbinTquadbin LogicalFunction nes-logical-operators AlwaysEqTquadbinTquadbinLogicalFunction.cpp) +add_plugin(AlwaysNeTquadbinTquadbin LogicalFunction nes-logical-operators AlwaysNeTquadbinTquadbinLogicalFunction.cpp) +add_plugin(EverEqTquadbinTquadbin LogicalFunction nes-logical-operators EverEqTquadbinTquadbinLogicalFunction.cpp) +add_plugin(EverNeTquadbinTquadbin LogicalFunction nes-logical-operators EverNeTquadbinTquadbinLogicalFunction.cpp) +add_plugin(AlwaysEqQuadbinTquadbin LogicalFunction nes-logical-operators AlwaysEqQuadbinTquadbinLogicalFunction.cpp) +add_plugin(AlwaysNeQuadbinTquadbin LogicalFunction nes-logical-operators AlwaysNeQuadbinTquadbinLogicalFunction.cpp) +add_plugin(EverEqQuadbinTquadbin LogicalFunction nes-logical-operators EverEqQuadbinTquadbinLogicalFunction.cpp) +add_plugin(EverNeQuadbinTquadbin LogicalFunction nes-logical-operators EverNeQuadbinTquadbinLogicalFunction.cpp) +add_plugin(AcoversGeoTgeo LogicalFunction nes-logical-operators AcoversGeoTgeoLogicalFunction.cpp) +add_plugin(TfloatCos LogicalFunction nes-logical-operators TfloatCosLogicalFunction.cpp) +add_plugin(TfloatSin LogicalFunction nes-logical-operators TfloatSinLogicalFunction.cpp) +add_plugin(TfloatTan LogicalFunction nes-logical-operators TfloatTanLogicalFunction.cpp) +add_plugin(TfloatDegrees LogicalFunction nes-logical-operators TfloatDegreesLogicalFunction.cpp) +add_plugin(TnumberAbs LogicalFunction nes-logical-operators TnumberAbsLogicalFunction.cpp) +add_plugin(TeqTfloatFloat LogicalFunction nes-logical-operators TeqTfloatFloatLogicalFunction.cpp) +add_plugin(TeqFloatTfloat LogicalFunction nes-logical-operators TeqFloatTfloatLogicalFunction.cpp) +add_plugin(TeqTintInt LogicalFunction nes-logical-operators TeqTintIntLogicalFunction.cpp) +add_plugin(TeqIntTint LogicalFunction nes-logical-operators TeqIntTintLogicalFunction.cpp) +add_plugin(TeqTtextText LogicalFunction nes-logical-operators TeqTtextTextLogicalFunction.cpp) +add_plugin(TeqTextTtext LogicalFunction nes-logical-operators TeqTextTtextLogicalFunction.cpp) +add_plugin(TeqTemporalTemporal LogicalFunction nes-logical-operators TeqTemporalTemporalLogicalFunction.cpp) +add_plugin(TneTfloatFloat LogicalFunction nes-logical-operators TneTfloatFloatLogicalFunction.cpp) +add_plugin(TneFloatTfloat LogicalFunction nes-logical-operators TneFloatTfloatLogicalFunction.cpp) +add_plugin(TneTintInt LogicalFunction nes-logical-operators TneTintIntLogicalFunction.cpp) +add_plugin(TneIntTint LogicalFunction nes-logical-operators TneIntTintLogicalFunction.cpp) +add_plugin(TneTtextText LogicalFunction nes-logical-operators TneTtextTextLogicalFunction.cpp) +add_plugin(TneTextTtext LogicalFunction nes-logical-operators TneTextTtextLogicalFunction.cpp) +add_plugin(TneTemporalTemporal LogicalFunction nes-logical-operators TneTemporalTemporalLogicalFunction.cpp) +add_plugin(TltTfloatFloat LogicalFunction nes-logical-operators TltTfloatFloatLogicalFunction.cpp) +add_plugin(TltFloatTfloat LogicalFunction nes-logical-operators TltFloatTfloatLogicalFunction.cpp) +add_plugin(TltTintInt LogicalFunction nes-logical-operators TltTintIntLogicalFunction.cpp) +add_plugin(TltIntTint LogicalFunction nes-logical-operators TltIntTintLogicalFunction.cpp) +add_plugin(TltTtextText LogicalFunction nes-logical-operators TltTtextTextLogicalFunction.cpp) +add_plugin(TltTextTtext LogicalFunction nes-logical-operators TltTextTtextLogicalFunction.cpp) +add_plugin(TltTemporalTemporal LogicalFunction nes-logical-operators TltTemporalTemporalLogicalFunction.cpp) +add_plugin(TleTfloatFloat LogicalFunction nes-logical-operators TleTfloatFloatLogicalFunction.cpp) +add_plugin(TleFloatTfloat LogicalFunction nes-logical-operators TleFloatTfloatLogicalFunction.cpp) +add_plugin(TleTintInt LogicalFunction nes-logical-operators TleTintIntLogicalFunction.cpp) +add_plugin(TleIntTint LogicalFunction nes-logical-operators TleIntTintLogicalFunction.cpp) +add_plugin(TleTtextText LogicalFunction nes-logical-operators TleTtextTextLogicalFunction.cpp) +add_plugin(TleTextTtext LogicalFunction nes-logical-operators TleTextTtextLogicalFunction.cpp) +add_plugin(TleTemporalTemporal LogicalFunction nes-logical-operators TleTemporalTemporalLogicalFunction.cpp) +add_plugin(TgtTfloatFloat LogicalFunction nes-logical-operators TgtTfloatFloatLogicalFunction.cpp) +add_plugin(TgtFloatTfloat LogicalFunction nes-logical-operators TgtFloatTfloatLogicalFunction.cpp) +add_plugin(TgtTintInt LogicalFunction nes-logical-operators TgtTintIntLogicalFunction.cpp) +add_plugin(TgtIntTint LogicalFunction nes-logical-operators TgtIntTintLogicalFunction.cpp) +add_plugin(TgtTtextText LogicalFunction nes-logical-operators TgtTtextTextLogicalFunction.cpp) +add_plugin(TgtTextTtext LogicalFunction nes-logical-operators TgtTextTtextLogicalFunction.cpp) +add_plugin(TgtTemporalTemporal LogicalFunction nes-logical-operators TgtTemporalTemporalLogicalFunction.cpp) +add_plugin(TgeTfloatFloat LogicalFunction nes-logical-operators TgeTfloatFloatLogicalFunction.cpp) +add_plugin(TgeFloatTfloat LogicalFunction nes-logical-operators TgeFloatTfloatLogicalFunction.cpp) +add_plugin(TgeTintInt LogicalFunction nes-logical-operators TgeTintIntLogicalFunction.cpp) +add_plugin(TgeIntTint LogicalFunction nes-logical-operators TgeIntTintLogicalFunction.cpp) +add_plugin(TgeTtextText LogicalFunction nes-logical-operators TgeTtextTextLogicalFunction.cpp) +add_plugin(TgeTextTtext LogicalFunction nes-logical-operators TgeTextTtextLogicalFunction.cpp) +add_plugin(TgeTemporalTemporal LogicalFunction nes-logical-operators TgeTemporalTemporalLogicalFunction.cpp) +add_plugin(GeoFromGeojson LogicalFunction nes-logical-operators GeoFromGeojsonLogicalFunction.cpp) +add_plugin(GeomFromHexewkb LogicalFunction nes-logical-operators GeomFromHexewkbLogicalFunction.cpp) +add_plugin(GeoAsHexewkb LogicalFunction nes-logical-operators GeoAsHexewkbLogicalFunction.cpp) +add_plugin(GeomMinBoundingCenter LogicalFunction nes-logical-operators GeomMinBoundingCenterLogicalFunction.cpp) +add_plugin(GeomMinBoundingRadius LogicalFunction nes-logical-operators GeomMinBoundingRadiusLogicalFunction.cpp) +add_plugin(GeoTransformPipeline LogicalFunction nes-logical-operators GeoTransformPipelineLogicalFunction.cpp) +add_plugin(GeomBuffer LogicalFunction nes-logical-operators GeomBufferLogicalFunction.cpp) +add_plugin(GeomRelatePattern LogicalFunction nes-logical-operators GeomRelatePatternLogicalFunction.cpp) +add_plugin(H3GsPointToCell LogicalFunction nes-logical-operators H3GsPointToCellLogicalFunction.cpp) +add_plugin(H3indexIn LogicalFunction nes-logical-operators H3indexInLogicalFunction.cpp) +add_plugin(EintersectsTpcpointGeo LogicalFunction nes-logical-operators EintersectsTpcpointGeoLogicalFunction.cpp) +add_plugin(NadTpcpointGeo LogicalFunction nes-logical-operators NadTpcpointGeoLogicalFunction.cpp) +add_plugin(JsonArrayLength LogicalFunction nes-logical-operators JsonArrayLengthLogicalFunction.cpp) +add_plugin(JsonTypeof LogicalFunction nes-logical-operators JsonTypeofLogicalFunction.cpp) +add_plugin(JsonArrayElementText LogicalFunction nes-logical-operators JsonArrayElementTextLogicalFunction.cpp) +add_plugin(JsonObjectFieldText LogicalFunction nes-logical-operators JsonObjectFieldTextLogicalFunction.cpp) +add_plugin(FloatspanMake LogicalFunction nes-logical-operators FloatspanMakeLogicalFunction.cpp) +add_plugin(IntspanMake LogicalFunction nes-logical-operators IntspanMakeLogicalFunction.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/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/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/EcontainsTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..795087bb23 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferCbufferLogicalFunction.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 +{ + +EcontainsTcbufferCbufferLogicalFunction::EcontainsTcbufferCbufferLogicalFunction(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 EcontainsTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcontainsTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcontainsTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcontainsTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EcontainsTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcontainsTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EcontainsTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcontainsTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcontainsTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcontainsTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcontainsTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EcontainsTcbufferCbufferLogicalFunction 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 EcontainsTcbufferCbufferLogicalFunction(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/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/EcoversTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..035c5db6cd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversTcbufferCbufferLogicalFunction.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 +{ + +EcoversTcbufferCbufferLogicalFunction::EcoversTcbufferCbufferLogicalFunction(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 EcoversTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcoversTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcoversTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcoversTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EcoversTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcoversTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EcoversTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcoversTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcoversTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcoversTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EcoversTcbufferCbufferLogicalFunction 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 EcoversTcbufferCbufferLogicalFunction(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/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/EdisjointTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..098b73acf6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferCbufferLogicalFunction.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 +{ + +EdisjointTcbufferCbufferLogicalFunction::EdisjointTcbufferCbufferLogicalFunction(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 EdisjointTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdisjointTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdisjointTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdisjointTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EdisjointTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdisjointTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EdisjointTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdisjointTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdisjointTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdisjointTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EdisjointTcbufferCbufferLogicalFunction 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 EdisjointTcbufferCbufferLogicalFunction(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/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/EintersectsTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..7e751da9ef --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferCbufferLogicalFunction.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 +{ + +EintersectsTcbufferCbufferLogicalFunction::EintersectsTcbufferCbufferLogicalFunction(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 EintersectsTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EintersectsTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EintersectsTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EintersectsTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EintersectsTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EintersectsTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EintersectsTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EintersectsTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EintersectsTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EintersectsTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EintersectsTcbufferCbufferLogicalFunction 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 EintersectsTcbufferCbufferLogicalFunction(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/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/EintersectsTpcpointGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTpcpointGeoLogicalFunction.cpp new file mode 100644 index 0000000000..8c8bcce7ed --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTpcpointGeoLogicalFunction.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 +{ + +EintersectsTpcpointGeoLogicalFunction::EintersectsTpcpointGeoLogicalFunction(LogicalFunction pt_hexwkb, + LogicalFunction ts, + LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(pt_hexwkb)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType EintersectsTpcpointGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EintersectsTpcpointGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EintersectsTpcpointGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EintersectsTpcpointGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EintersectsTpcpointGeoLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EintersectsTpcpointGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EintersectsTpcpointGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EintersectsTpcpointGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EintersectsTpcpointGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EintersectsTpcpointGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTpcpointGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EintersectsTpcpointGeoLogicalFunction 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 EintersectsTpcpointGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/EtouchesTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..b9b9daf02f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferCbufferLogicalFunction.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 +{ + +EtouchesTcbufferCbufferLogicalFunction::EtouchesTcbufferCbufferLogicalFunction(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 EtouchesTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EtouchesTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EtouchesTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EtouchesTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EtouchesTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EtouchesTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EtouchesTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EtouchesTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EtouchesTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EtouchesTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EtouchesTcbufferCbufferLogicalFunction 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 EtouchesTcbufferCbufferLogicalFunction(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/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/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/EverEqQuadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqQuadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..c48ebc1e84 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqQuadbinTquadbinLogicalFunction.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 +{ + +EverEqQuadbinTquadbinLogicalFunction::EverEqQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(cell1)); + parameters.push_back(std::move(ts1)); +} + +DataType EverEqQuadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqQuadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqQuadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqQuadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqQuadbinTquadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqQuadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqQuadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqQuadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqQuadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqQuadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqQuadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqQuadbinTquadbinLogicalFunction 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 EverEqQuadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/EverEqTquadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTquadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..bee08fb222 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTquadbinTquadbinLogicalFunction.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 +{ + +EverEqTquadbinTquadbinLogicalFunction::EverEqTquadbinTquadbinLogicalFunction(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 EverEqTquadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTquadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTquadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTquadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EverEqTquadbinTquadbinLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTquadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTquadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTquadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTquadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTquadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTquadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EverEqTquadbinTquadbinLogicalFunction 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 EverEqTquadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/EverNeQuadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeQuadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..aa4b82f7b0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeQuadbinTquadbinLogicalFunction.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 +{ + +EverNeQuadbinTquadbinLogicalFunction::EverNeQuadbinTquadbinLogicalFunction(LogicalFunction arg0, + LogicalFunction cell1, + LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(cell1)); + parameters.push_back(std::move(ts1)); +} + +DataType EverNeQuadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeQuadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeQuadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeQuadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeQuadbinTquadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeQuadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeQuadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeQuadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeQuadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeQuadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeQuadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeQuadbinTquadbinLogicalFunction 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 EverNeQuadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/EverNeTquadbinTquadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTquadbinTquadbinLogicalFunction.cpp new file mode 100644 index 0000000000..2fb8e45e04 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTquadbinTquadbinLogicalFunction.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 +{ + +EverNeTquadbinTquadbinLogicalFunction::EverNeTquadbinTquadbinLogicalFunction(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 EverNeTquadbinTquadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTquadbinTquadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTquadbinTquadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTquadbinTquadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EverNeTquadbinTquadbinLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTquadbinTquadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTquadbinTquadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTquadbinTquadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTquadbinTquadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTquadbinTquadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTquadbinTquadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EverNeTquadbinTquadbinLogicalFunction 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 EverNeTquadbinTquadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/FloatspanMakeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FloatspanMakeLogicalFunction.cpp new file mode 100644 index 0000000000..85a7312569 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FloatspanMakeLogicalFunction.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 +{ + +FloatspanMakeLogicalFunction::FloatspanMakeLogicalFunction(LogicalFunction lower, + LogicalFunction upper, + LogicalFunction lower_inc, + LogicalFunction upper_inc) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lower)); + parameters.push_back(std::move(upper)); + parameters.push_back(std::move(lower_inc)); + parameters.push_back(std::move(upper_inc)); +} + +DataType FloatspanMakeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FloatspanMakeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FloatspanMakeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FloatspanMakeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "FloatspanMakeLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FloatspanMakeLogicalFunction::getType() const +{ + return NAME; +} + +bool FloatspanMakeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FloatspanMakeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FloatspanMakeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FloatspanMakeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFloatspanMakeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "FloatspanMakeLogicalFunction 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 FloatspanMakeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/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/GeoAsHexewkbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoAsHexewkbLogicalFunction.cpp new file mode 100644 index 0000000000..16377c4559 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoAsHexewkbLogicalFunction.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 +{ + +GeoAsHexewkbLogicalFunction::GeoAsHexewkbLogicalFunction(LogicalFunction wkt, + LogicalFunction endian) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(endian)); +} + +DataType GeoAsHexewkbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoAsHexewkbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoAsHexewkbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoAsHexewkbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoAsHexewkbLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoAsHexewkbLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoAsHexewkbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoAsHexewkbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoAsHexewkbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoAsHexewkbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoAsHexewkbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoAsHexewkbLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoAsHexewkbLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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/GeoFromGeojsonLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoFromGeojsonLogicalFunction.cpp new file mode 100644 index 0000000000..5967a69fb3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoFromGeojsonLogicalFunction.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 +{ + +GeoFromGeojsonLogicalFunction::GeoFromGeojsonLogicalFunction(LogicalFunction json) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(json)); +} + +DataType GeoFromGeojsonLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoFromGeojsonLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoFromGeojsonLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoFromGeojsonLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoFromGeojsonLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoFromGeojsonLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoFromGeojsonLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoFromGeojsonLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoFromGeojsonLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoFromGeojsonLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoFromGeojsonLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoFromGeojsonLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoFromGeojsonLogicalFunction(std::move(arg0)); +} + +} // 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/GeoTransformPipelineLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoTransformPipelineLogicalFunction.cpp new file mode 100644 index 0000000000..39af913532 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoTransformPipelineLogicalFunction.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 +{ + +GeoTransformPipelineLogicalFunction::GeoTransformPipelineLogicalFunction(LogicalFunction wkt, + LogicalFunction pipeline, + LogicalFunction srid_to, + LogicalFunction is_forward) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(4); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(pipeline)); + parameters.push_back(std::move(srid_to)); + parameters.push_back(std::move(is_forward)); +} + +DataType GeoTransformPipelineLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoTransformPipelineLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoTransformPipelineLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoTransformPipelineLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "GeoTransformPipelineLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoTransformPipelineLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoTransformPipelineLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoTransformPipelineLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoTransformPipelineLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoTransformPipelineLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoTransformPipelineLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "GeoTransformPipelineLogicalFunction 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 GeoTransformPipelineLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/GeomBufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomBufferLogicalFunction.cpp new file mode 100644 index 0000000000..15fcd69a5d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomBufferLogicalFunction.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 +{ + +GeomBufferLogicalFunction::GeomBufferLogicalFunction(LogicalFunction wkt, + LogicalFunction size, + LogicalFunction params) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(size)); + parameters.push_back(std::move(params)); +} + +DataType GeomBufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomBufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomBufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomBufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeomBufferLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomBufferLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomBufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomBufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomBufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomBufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomBufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeomBufferLogicalFunction 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 GeomBufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/GeomFromHexewkbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomFromHexewkbLogicalFunction.cpp new file mode 100644 index 0000000000..ccff30940a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomFromHexewkbLogicalFunction.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 +{ + +GeomFromHexewkbLogicalFunction::GeomFromHexewkbLogicalFunction(LogicalFunction hex) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(hex)); +} + +DataType GeomFromHexewkbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomFromHexewkbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomFromHexewkbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomFromHexewkbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomFromHexewkbLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomFromHexewkbLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomFromHexewkbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomFromHexewkbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomFromHexewkbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomFromHexewkbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomFromHexewkbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomFromHexewkbLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomFromHexewkbLogicalFunction(std::move(arg0)); +} + +} // 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/GeomMinBoundingCenterLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomMinBoundingCenterLogicalFunction.cpp new file mode 100644 index 0000000000..4e3bc70a39 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomMinBoundingCenterLogicalFunction.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 +{ + +GeomMinBoundingCenterLogicalFunction::GeomMinBoundingCenterLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomMinBoundingCenterLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomMinBoundingCenterLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomMinBoundingCenterLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomMinBoundingCenterLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomMinBoundingCenterLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomMinBoundingCenterLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomMinBoundingCenterLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomMinBoundingCenterLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomMinBoundingCenterLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomMinBoundingCenterLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomMinBoundingCenterLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomMinBoundingCenterLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomMinBoundingCenterLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomMinBoundingRadiusLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomMinBoundingRadiusLogicalFunction.cpp new file mode 100644 index 0000000000..ad9a6c5a17 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomMinBoundingRadiusLogicalFunction.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 +{ + +GeomMinBoundingRadiusLogicalFunction::GeomMinBoundingRadiusLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomMinBoundingRadiusLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomMinBoundingRadiusLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomMinBoundingRadiusLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomMinBoundingRadiusLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomMinBoundingRadiusLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomMinBoundingRadiusLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomMinBoundingRadiusLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomMinBoundingRadiusLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomMinBoundingRadiusLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomMinBoundingRadiusLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomMinBoundingRadiusLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomMinBoundingRadiusLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomMinBoundingRadiusLogicalFunction(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/GeomRelatePatternLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomRelatePatternLogicalFunction.cpp new file mode 100644 index 0000000000..02afd31907 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomRelatePatternLogicalFunction.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 +{ + +GeomRelatePatternLogicalFunction::GeomRelatePatternLogicalFunction(LogicalFunction wkt1, + LogicalFunction wkt2, + LogicalFunction pattern) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt1)); + parameters.push_back(std::move(wkt2)); + parameters.push_back(std::move(pattern)); +} + +DataType GeomRelatePatternLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomRelatePatternLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomRelatePatternLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomRelatePatternLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeomRelatePatternLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomRelatePatternLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomRelatePatternLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomRelatePatternLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomRelatePatternLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomRelatePatternLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomRelatePatternLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeomRelatePatternLogicalFunction 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 GeomRelatePatternLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/H3GsPointToCellLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3GsPointToCellLogicalFunction.cpp new file mode 100644 index 0000000000..362a06bd80 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3GsPointToCellLogicalFunction.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 +{ + +H3GsPointToCellLogicalFunction::H3GsPointToCellLogicalFunction(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 H3GsPointToCellLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3GsPointToCellLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3GsPointToCellLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3GsPointToCellLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "H3GsPointToCellLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3GsPointToCellLogicalFunction::getType() const +{ + return NAME; +} + +bool H3GsPointToCellLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3GsPointToCellLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3GsPointToCellLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3GsPointToCellLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3GsPointToCellLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "H3GsPointToCellLogicalFunction 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 H3GsPointToCellLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/H3indexInLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexInLogicalFunction.cpp new file mode 100644 index 0000000000..03457513f9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexInLogicalFunction.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 +{ + +H3indexInLogicalFunction::H3indexInLogicalFunction(LogicalFunction hex) + : dataType(DataTypeProvider::provideDataType(DataType::Type::UINT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(hex)); +} + +DataType H3indexInLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexInLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexInLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexInLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "H3indexInLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexInLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexInLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexInLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexInLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexInLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexInLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "H3indexInLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return H3indexInLogicalFunction(std::move(arg0)); +} + +} // 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/IntersectLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntersectLogicalFunction.cpp deleted file mode 100644 index 8e5f3d8b8d..0000000000 --- a/nes-logical-operators/src/Functions/Meos/IntersectLogicalFunction.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for 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 - -namespace NES -{ - -IntersectLogicalFunction::IntersectLogicalFunction(LogicalFunction lon, LogicalFunction lat, LogicalFunction ts) - : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) - , lon(std::move(std::move(lon))) - , lat(std::move(std::move(lat))) - , ts(std::move(std::move(ts))) -{ -} - -DataType IntersectLogicalFunction::getDataType() const -{ - return dataType; -}; - -LogicalFunction IntersectLogicalFunction::withDataType(const DataType& dataType) const -{ - auto copy = *this; - copy.dataType = dataType; - return copy; -}; - -std::vector IntersectLogicalFunction::getChildren() const -{ - return {lon, lat, ts}; -}; - -LogicalFunction IntersectLogicalFunction::withChildren(const std::vector& children) const -{ - PRECONDITION(children.size() == 3, "IntersectLogicalFunction requires exactly three children, but got {}", children.size()); - auto copy = *this; - copy.lon = children[0]; - copy.lat = children[1]; - copy.ts = children[2]; - return copy; -}; - -std::string_view IntersectLogicalFunction::getType() const -{ - return NAME; -} - -bool IntersectLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const -{ - if (const auto* other = dynamic_cast(&rhs)) - { - const bool simpleMatch = lon == other->lon and lat == other->lat and ts == other->ts; - const bool commutativeMatch = lon == other->lat and lat == other->lon and ts == other->ts; - return simpleMatch or commutativeMatch; - } - return false; -} - - -std::string IntersectLogicalFunction::explain(ExplainVerbosity verbosity) const -{ - return fmt::format("INTERSECT({}, {}, {})", lon.explain(verbosity), lat.explain(verbosity), ts.explain(verbosity)); -} - -LogicalFunction IntersectLogicalFunction::withInferredDataType(const Schema& schema) const -{ - std::vector newChildren; - for (auto& node : getChildren()) - { - newChildren.push_back(node.withInferredDataType(schema)); - } - /// check if children dataType is correct - spatial coordinates should be numeric - INVARIANT( - lon.getDataType().isType(DataType::Type::FLOAT64), "the dataType of longitude child must be FLOAT64, but was: {}", lon.getDataType()); - INVARIANT( - lat.getDataType().isType(DataType::Type::FLOAT64), - "the dataType of latitude child must be FLOAT64, but was: {}", - lat.getDataType()); - INVARIANT( - ts.getDataType().isType(DataType::Type::UINT64), - "the dataType of timestamp child must be UINT64, but was: {}", - ts.getDataType()); - return this->withChildren(newChildren); -} - -SerializableFunction IntersectLogicalFunction::serialize() const -{ - SerializableFunction serializedFunction; - serializedFunction.set_function_type(NAME); - serializedFunction.add_children()->CopyFrom(lon.serialize()); - serializedFunction.add_children()->CopyFrom(lat.serialize()); - serializedFunction.add_children()->CopyFrom(ts.serialize()); - DataTypeSerializationUtil::serializeDataType(this->getDataType(), serializedFunction.mutable_data_type()); - return serializedFunction; -} - -LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntersectLogicalFunction(LogicalFunctionRegistryArguments arguments) -{ - PRECONDITION(arguments.children.size() == 3, "IntersectLogicalFunction requires exactly three children, but got {}", arguments.children.size()); - return IntersectLogicalFunction(arguments.children[0], arguments.children[1], arguments.children[2]); -} - - -} 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/IntspanMakeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntspanMakeLogicalFunction.cpp new file mode 100644 index 0000000000..444313c0fc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/IntspanMakeLogicalFunction.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 +{ + +IntspanMakeLogicalFunction::IntspanMakeLogicalFunction(LogicalFunction lower, + LogicalFunction upper, + LogicalFunction lower_inc, + LogicalFunction upper_inc) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lower)); + parameters.push_back(std::move(upper)); + parameters.push_back(std::move(lower_inc)); + parameters.push_back(std::move(upper_inc)); +} + +DataType IntspanMakeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction IntspanMakeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector IntspanMakeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction IntspanMakeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "IntspanMakeLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view IntspanMakeLogicalFunction::getType() const +{ + return NAME; +} + +bool IntspanMakeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string IntspanMakeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction IntspanMakeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction IntspanMakeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntspanMakeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "IntspanMakeLogicalFunction 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 IntspanMakeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/JsonArrayElementTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonArrayElementTextLogicalFunction.cpp new file mode 100644 index 0000000000..e8c5d8739e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonArrayElementTextLogicalFunction.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 +{ + +JsonArrayElementTextLogicalFunction::JsonArrayElementTextLogicalFunction(LogicalFunction json, + LogicalFunction idx) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(json)); + parameters.push_back(std::move(idx)); +} + +DataType JsonArrayElementTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonArrayElementTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonArrayElementTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonArrayElementTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonArrayElementTextLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonArrayElementTextLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonArrayElementTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonArrayElementTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonArrayElementTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonArrayElementTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonArrayElementTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonArrayElementTextLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonArrayElementTextLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonArrayLengthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonArrayLengthLogicalFunction.cpp new file mode 100644 index 0000000000..32faf5001c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonArrayLengthLogicalFunction.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 +{ + +JsonArrayLengthLogicalFunction::JsonArrayLengthLogicalFunction(LogicalFunction json) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(json)); +} + +DataType JsonArrayLengthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonArrayLengthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonArrayLengthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonArrayLengthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "JsonArrayLengthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonArrayLengthLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonArrayLengthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonArrayLengthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonArrayLengthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonArrayLengthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonArrayLengthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "JsonArrayLengthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return JsonArrayLengthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonObjectFieldTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonObjectFieldTextLogicalFunction.cpp new file mode 100644 index 0000000000..3bb2b66608 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonObjectFieldTextLogicalFunction.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 +{ + +JsonObjectFieldTextLogicalFunction::JsonObjectFieldTextLogicalFunction(LogicalFunction json, + LogicalFunction key) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(json)); + parameters.push_back(std::move(key)); +} + +DataType JsonObjectFieldTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonObjectFieldTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonObjectFieldTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonObjectFieldTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonObjectFieldTextLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonObjectFieldTextLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonObjectFieldTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonObjectFieldTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonObjectFieldTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonObjectFieldTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonObjectFieldTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonObjectFieldTextLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonObjectFieldTextLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonTypeofLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonTypeofLogicalFunction.cpp new file mode 100644 index 0000000000..2ef783a5de --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonTypeofLogicalFunction.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 +{ + +JsonTypeofLogicalFunction::JsonTypeofLogicalFunction(LogicalFunction json) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(json)); +} + +DataType JsonTypeofLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonTypeofLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonTypeofLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonTypeofLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "JsonTypeofLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonTypeofLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonTypeofLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonTypeofLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonTypeofLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonTypeofLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonTypeofLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "JsonTypeofLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return JsonTypeofLogicalFunction(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/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/NadTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..f1a9482ff6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTcbufferCbufferLogicalFunction.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 +{ + +NadTcbufferCbufferLogicalFunction::NadTcbufferCbufferLogicalFunction(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 NadTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "NadTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "NadTcbufferCbufferLogicalFunction 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 NadTcbufferCbufferLogicalFunction(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/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/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/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/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/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/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/NadTpcpointGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTpcpointGeoLogicalFunction.cpp new file mode 100644 index 0000000000..4b22ed70a5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTpcpointGeoLogicalFunction.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 +{ + +NadTpcpointGeoLogicalFunction::NadTpcpointGeoLogicalFunction(LogicalFunction pt_hexwkb, + LogicalFunction ts, + LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(pt_hexwkb)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType NadTpcpointGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTpcpointGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTpcpointGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTpcpointGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "NadTpcpointGeoLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTpcpointGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTpcpointGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTpcpointGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTpcpointGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTpcpointGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTpcpointGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "NadTpcpointGeoLogicalFunction 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 NadTpcpointGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/TeqFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..3c86c00568 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqFloatTfloatLogicalFunction.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 +{ + +TeqFloatTfloatLogicalFunction::TeqFloatTfloatLogicalFunction(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 TeqFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TeqFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TeqFloatTfloatLogicalFunction 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 TeqFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TeqIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..386ee52d83 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqIntTintLogicalFunction.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 +{ + +TeqIntTintLogicalFunction::TeqIntTintLogicalFunction(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 TeqIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TeqIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TeqIntTintLogicalFunction 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 TeqIntTintLogicalFunction(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/TeqTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..ad8e83d1b1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqTemporalTemporalLogicalFunction.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 +{ + +TeqTemporalTemporalLogicalFunction::TeqTemporalTemporalLogicalFunction(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 TeqTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TeqTemporalTemporalLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TeqTemporalTemporalLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TeqTemporalTemporalLogicalFunction(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..39b90ab09f --- /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::BOOLEAN)) +{ + 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/TeqTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..103a3bdbf4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqTfloatFloatLogicalFunction.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 +{ + +TeqTfloatFloatLogicalFunction::TeqTfloatFloatLogicalFunction(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 TeqTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TeqTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TeqTfloatFloatLogicalFunction 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 TeqTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TeqTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..85b90f6e5d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqTintIntLogicalFunction.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 +{ + +TeqTintIntLogicalFunction::TeqTintIntLogicalFunction(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 TeqTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TeqTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TeqTintIntLogicalFunction 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 TeqTintIntLogicalFunction(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..53177de52e --- /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::BOOLEAN)) +{ + 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/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/TfloatCosLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatCosLogicalFunction.cpp new file mode 100644 index 0000000000..e19c2106a5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatCosLogicalFunction.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 +{ + +TfloatCosLogicalFunction::TfloatCosLogicalFunction(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 TfloatCosLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatCosLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatCosLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatCosLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatCosLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatCosLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatCosLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatCosLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatCosLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatCosLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatCosLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatCosLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatCosLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatDegreesLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatDegreesLogicalFunction.cpp new file mode 100644 index 0000000000..5cc5714734 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatDegreesLogicalFunction.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 +{ + +TfloatDegreesLogicalFunction::TfloatDegreesLogicalFunction(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 TfloatDegreesLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatDegreesLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatDegreesLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatDegreesLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TfloatDegreesLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatDegreesLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatDegreesLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatDegreesLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatDegreesLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatDegreesLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatDegreesLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TfloatDegreesLogicalFunction 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 TfloatDegreesLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/TfloatSinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatSinLogicalFunction.cpp new file mode 100644 index 0000000000..63a221ed7f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatSinLogicalFunction.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 +{ + +TfloatSinLogicalFunction::TfloatSinLogicalFunction(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 TfloatSinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatSinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatSinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatSinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatSinLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatSinLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatSinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatSinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatSinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatSinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatSinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatSinLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatSinLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatTanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatTanLogicalFunction.cpp new file mode 100644 index 0000000000..b6511dd544 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatTanLogicalFunction.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 +{ + +TfloatTanLogicalFunction::TfloatTanLogicalFunction(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 TfloatTanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatTanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatTanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatTanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatTanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatTanLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatTanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatTanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatTanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatTanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatTanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatTanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatTanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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/TgeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..353c8c8a0d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgeFloatTfloatLogicalFunction.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 +{ + +TgeFloatTfloatLogicalFunction::TgeFloatTfloatLogicalFunction(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 TgeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TgeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgeFloatTfloatLogicalFunction 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 TgeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TgeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..dea639aa5b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgeIntTintLogicalFunction.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 +{ + +TgeIntTintLogicalFunction::TgeIntTintLogicalFunction(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 TgeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TgeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgeIntTintLogicalFunction 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 TgeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TgeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..c485189e80 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgeTemporalTemporalLogicalFunction.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 +{ + +TgeTemporalTemporalLogicalFunction::TgeTemporalTemporalLogicalFunction(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 TgeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TgeTemporalTemporalLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool TgeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TgeTemporalTemporalLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TgeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..f4970ede36 --- /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::BOOLEAN)) +{ + 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/TgeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..4139c856fe --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgeTfloatFloatLogicalFunction.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 +{ + +TgeTfloatFloatLogicalFunction::TgeTfloatFloatLogicalFunction(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 TgeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TgeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgeTfloatFloatLogicalFunction 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 TgeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TgeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..2f83822068 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgeTintIntLogicalFunction.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 +{ + +TgeTintIntLogicalFunction::TgeTintIntLogicalFunction(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 TgeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TgeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgeTintIntLogicalFunction 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 TgeTintIntLogicalFunction(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..fdd5141b59 --- /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::BOOLEAN)) +{ + 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/TgtFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgtFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..010532f2bf --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgtFloatTfloatLogicalFunction.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 +{ + +TgtFloatTfloatLogicalFunction::TgtFloatTfloatLogicalFunction(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 TgtFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgtFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgtFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgtFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgtFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgtFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TgtFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgtFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgtFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgtFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgtFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgtFloatTfloatLogicalFunction 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 TgtFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TgtIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgtIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..6d15e3b145 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgtIntTintLogicalFunction.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 +{ + +TgtIntTintLogicalFunction::TgtIntTintLogicalFunction(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 TgtIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgtIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgtIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgtIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgtIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgtIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TgtIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgtIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgtIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgtIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgtIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgtIntTintLogicalFunction 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 TgtIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TgtTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgtTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..ca08a78e31 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgtTemporalTemporalLogicalFunction.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 +{ + +TgtTemporalTemporalLogicalFunction::TgtTemporalTemporalLogicalFunction(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 TgtTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgtTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgtTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgtTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TgtTemporalTemporalLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgtTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool TgtTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgtTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgtTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgtTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgtTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TgtTemporalTemporalLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TgtTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..9941047405 --- /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::BOOLEAN)) +{ + 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/TgtTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgtTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..686ce68677 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgtTfloatFloatLogicalFunction.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 +{ + +TgtTfloatFloatLogicalFunction::TgtTfloatFloatLogicalFunction(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 TgtTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgtTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgtTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgtTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgtTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgtTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TgtTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgtTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgtTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgtTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgtTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgtTfloatFloatLogicalFunction 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 TgtTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TgtTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TgtTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..728b9fa90d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TgtTintIntLogicalFunction.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 +{ + +TgtTintIntLogicalFunction::TgtTintIntLogicalFunction(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 TgtTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TgtTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TgtTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TgtTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TgtTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TgtTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TgtTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TgtTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TgtTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TgtTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTgtTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TgtTintIntLogicalFunction 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 TgtTintIntLogicalFunction(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..7ec1f537bf --- /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::BOOLEAN)) +{ + 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/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/TleFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TleFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..0577d2eabc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TleFloatTfloatLogicalFunction.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 +{ + +TleFloatTfloatLogicalFunction::TleFloatTfloatLogicalFunction(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 TleFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TleFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TleFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TleFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TleFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TleFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TleFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TleFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TleFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TleFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTleFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TleFloatTfloatLogicalFunction 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 TleFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TleIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TleIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..f1119b70c2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TleIntTintLogicalFunction.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 +{ + +TleIntTintLogicalFunction::TleIntTintLogicalFunction(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 TleIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TleIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TleIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TleIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TleIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TleIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TleIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TleIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TleIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TleIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTleIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TleIntTintLogicalFunction 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 TleIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TleTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TleTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..a718d25893 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TleTemporalTemporalLogicalFunction.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 +{ + +TleTemporalTemporalLogicalFunction::TleTemporalTemporalLogicalFunction(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 TleTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TleTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TleTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TleTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TleTemporalTemporalLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TleTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool TleTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TleTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TleTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TleTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTleTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TleTemporalTemporalLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TleTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..de641c54a2 --- /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::BOOLEAN)) +{ + 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/TleTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TleTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..f6a991e5e2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TleTfloatFloatLogicalFunction.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 +{ + +TleTfloatFloatLogicalFunction::TleTfloatFloatLogicalFunction(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 TleTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TleTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TleTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TleTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TleTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TleTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TleTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TleTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TleTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TleTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTleTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TleTfloatFloatLogicalFunction 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 TleTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TleTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TleTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..c2e53dda82 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TleTintIntLogicalFunction.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 +{ + +TleTintIntLogicalFunction::TleTintIntLogicalFunction(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 TleTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TleTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TleTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TleTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TleTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TleTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TleTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TleTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TleTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TleTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTleTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TleTintIntLogicalFunction 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 TleTintIntLogicalFunction(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..fc2cb9b8ee --- /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::BOOLEAN)) +{ + 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/TltFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TltFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..80ef966128 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TltFloatTfloatLogicalFunction.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 +{ + +TltFloatTfloatLogicalFunction::TltFloatTfloatLogicalFunction(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 TltFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TltFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TltFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TltFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TltFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TltFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TltFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TltFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TltFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TltFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTltFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TltFloatTfloatLogicalFunction 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 TltFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TltIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TltIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..ce63bf3cfc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TltIntTintLogicalFunction.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 +{ + +TltIntTintLogicalFunction::TltIntTintLogicalFunction(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 TltIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TltIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TltIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TltIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TltIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TltIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TltIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TltIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TltIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TltIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTltIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TltIntTintLogicalFunction 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 TltIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TltTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TltTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..8bfab44ad3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TltTemporalTemporalLogicalFunction.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 +{ + +TltTemporalTemporalLogicalFunction::TltTemporalTemporalLogicalFunction(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 TltTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TltTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TltTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TltTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TltTemporalTemporalLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TltTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool TltTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TltTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TltTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TltTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTltTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TltTemporalTemporalLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TltTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..48746e45cb --- /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::BOOLEAN)) +{ + 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/TltTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TltTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..e783a5eb48 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TltTfloatFloatLogicalFunction.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 +{ + +TltTfloatFloatLogicalFunction::TltTfloatFloatLogicalFunction(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 TltTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TltTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TltTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TltTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TltTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TltTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TltTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TltTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TltTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TltTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTltTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TltTfloatFloatLogicalFunction 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 TltTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TltTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TltTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..745af182f8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TltTintIntLogicalFunction.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 +{ + +TltTintIntLogicalFunction::TltTintIntLogicalFunction(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 TltTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TltTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TltTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TltTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TltTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TltTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TltTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TltTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TltTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TltTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTltTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TltTintIntLogicalFunction 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 TltTintIntLogicalFunction(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..150af7ab8e --- /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::BOOLEAN)) +{ + 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/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/TneFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..a3d20b470d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneFloatTfloatLogicalFunction.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 +{ + +TneFloatTfloatLogicalFunction::TneFloatTfloatLogicalFunction(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 TneFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TneFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TneFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TneFloatTfloatLogicalFunction 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 TneFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TneIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..196068e047 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneIntTintLogicalFunction.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 +{ + +TneIntTintLogicalFunction::TneIntTintLogicalFunction(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 TneIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TneIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TneIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TneIntTintLogicalFunction 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 TneIntTintLogicalFunction(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/TneTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..1330f82ae5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneTemporalTemporalLogicalFunction.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 +{ + +TneTemporalTemporalLogicalFunction::TneTemporalTemporalLogicalFunction(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 TneTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TneTemporalTemporalLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool TneTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TneTemporalTemporalLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TneTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..9ef174ee0e --- /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::BOOLEAN)) +{ + 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/TneTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..b700df214a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneTfloatFloatLogicalFunction.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 +{ + +TneTfloatFloatLogicalFunction::TneTfloatFloatLogicalFunction(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 TneTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TneTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TneTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TneTfloatFloatLogicalFunction 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 TneTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TneTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..354f4f2673 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneTintIntLogicalFunction.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 +{ + +TneTintIntLogicalFunction::TneTintIntLogicalFunction(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 TneTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TneTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TneTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TneTintIntLogicalFunction 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 TneTintIntLogicalFunction(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..cf8b42e565 --- /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::BOOLEAN)) +{ + 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/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/TnumberAbsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TnumberAbsLogicalFunction.cpp new file mode 100644 index 0000000000..d86450c2b7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TnumberAbsLogicalFunction.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 +{ + +TnumberAbsLogicalFunction::TnumberAbsLogicalFunction(LogicalFunction traj) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(traj)); +} + +DataType TnumberAbsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TnumberAbsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TnumberAbsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TnumberAbsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "TnumberAbsLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TnumberAbsLogicalFunction::getType() const +{ + return NAME; +} + +bool TnumberAbsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TnumberAbsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TnumberAbsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TnumberAbsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTnumberAbsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "TnumberAbsLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return TnumberAbsLogicalFunction(std::move(arg0)); +} + +} // 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/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/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/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/AcontainsTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..e60b5f302c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferCbufferPhysicalFunction.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 AcontainsTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AcontainsTcbufferCbufferPhysicalFunction(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/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/AcoversGeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversGeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..4063ad08ea --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversGeoTgeoPhysicalFunction.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 `acovers_geo_tgeo`. + * + * Per-event acovers_geo_tgeo. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcoversGeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversGeoTgeoPhysicalFunction(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/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/AcoversTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..0eb36b879b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversTcbufferCbufferPhysicalFunction.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 AcoversTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversTcbufferCbufferPhysicalFunction(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/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/AdisjointTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..bec3dfd4b7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferCbufferPhysicalFunction.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 AdisjointTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTcbufferCbufferPhysicalFunction(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/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/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/AintersectsTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..b284cb985c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferCbufferPhysicalFunction.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 AintersectsTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTcbufferCbufferPhysicalFunction(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/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/AlwaysEqQuadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqQuadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..35a70d662a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqQuadbinTquadbinPhysicalFunction.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_quadbin_tquadbin`. + * + * Per-event always_eq_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqQuadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function); + + 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/AlwaysEqTquadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTquadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..989798748d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTquadbinTquadbinPhysicalFunction.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_tquadbin_tquadbin`. + * + * Per-event always_eq_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTquadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTquadbinTquadbinPhysicalFunction(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/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/AlwaysNeQuadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeQuadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..e2470b1584 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeQuadbinTquadbinPhysicalFunction.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_quadbin_tquadbin`. + * + * Per-event always_ne_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeQuadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function); + + 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/AlwaysNeTquadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTquadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..b681e39498 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTquadbinTquadbinPhysicalFunction.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_tquadbin_tquadbin`. + * + * Per-event always_ne_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTquadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTquadbinTquadbinPhysicalFunction(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/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/AtouchesTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..0b756939f5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferCbufferPhysicalFunction.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 AtouchesTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTcbufferCbufferPhysicalFunction(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/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/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/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/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/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/EcontainsTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..f8332b9425 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferCbufferPhysicalFunction.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 EcontainsTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EcontainsTcbufferCbufferPhysicalFunction(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/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/EcoversTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..a627eae8d1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversTcbufferCbufferPhysicalFunction.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 EcoversTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversTcbufferCbufferPhysicalFunction(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/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/EdisjointTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..1087802ec9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferCbufferPhysicalFunction.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 EdisjointTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTcbufferCbufferPhysicalFunction(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/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/EintersectsTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..539263bce6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferCbufferPhysicalFunction.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 EintersectsTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTcbufferCbufferPhysicalFunction(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/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/EintersectsTpcpointGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTpcpointGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..f8b19998c3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTpcpointGeoPhysicalFunction.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 `({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}bool _r=eintersects_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r?1.0:0.0;})`. + * + * Ever-intersects predicate for a tpcpoint instant and a geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EintersectsTpcpointGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTpcpointGeoPhysicalFunction(PhysicalFunction pt_hexwkbFunction, + PhysicalFunction tsFunction, + PhysicalFunction tgt_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/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/EtouchesTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..bc57462e84 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferCbufferPhysicalFunction.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 EtouchesTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTcbufferCbufferPhysicalFunction(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/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/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/EverEqQuadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqQuadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..3b66e1bba1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqQuadbinTquadbinPhysicalFunction.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_quadbin_tquadbin`. + * + * Per-event ever_eq_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqQuadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function); + + 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/EverEqTquadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTquadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..e052add53c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTquadbinTquadbinPhysicalFunction.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_tquadbin_tquadbin`. + * + * Per-event ever_eq_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTquadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTquadbinTquadbinPhysicalFunction(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/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/EverNeQuadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeQuadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..2d121a89dd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeQuadbinTquadbinPhysicalFunction.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_quadbin_tquadbin`. + * + * Per-event ever_ne_quadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeQuadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function); + + 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/EverNeTquadbinTquadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTquadbinTquadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..9bb0319a9d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTquadbinTquadbinPhysicalFunction.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_tquadbin_tquadbin`. + * + * Per-event ever_ne_tquadbin_tquadbin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTquadbinTquadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTquadbinTquadbinPhysicalFunction(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/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/FloatspanMakePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FloatspanMakePhysicalFunction.hpp new file mode 100644 index 0000000000..60decdf8f6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FloatspanMakePhysicalFunction.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 `({Span* _sp=floatspan_make(lower,upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=floatspan_out(_sp,-1);free(_sp);_out;})`. + * + * Construct a float span from bounds and inclusivity flags. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FloatspanMakePhysicalFunction : public PhysicalFunctionConcept { +public: + FloatspanMakePhysicalFunction(PhysicalFunction lowerFunction, + PhysicalFunction upperFunction, + PhysicalFunction lower_incFunction, + PhysicalFunction upper_incFunction); + + 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/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/GeoAsHexewkbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoAsHexewkbPhysicalFunction.hpp new file mode 100644 index 0000000000..66797ff36c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoAsHexewkbPhysicalFunction.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 `({std::string _s(wktPtr,wktSize),_es(endianPtr,endianSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;char* _out=geo_as_hexewkb(_gs,_es.c_str());free(_gs);_out;})`. + * + * Encode geometry as hex-EWKB. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoAsHexewkbPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoAsHexewkbPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction endianFunction); + + 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/GeoFromGeojsonPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoFromGeojsonPhysicalFunction.hpp new file mode 100644 index 0000000000..965494cda2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoFromGeojsonPhysicalFunction.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_from_geojson(std::string(jsonPtr,jsonSize).c_str())`. + * + * Deserialise GeoJSON string to geometry WKT. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoFromGeojsonPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoFromGeojsonPhysicalFunction(PhysicalFunction jsonFunction); + + 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/GeoTransformPipelinePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoTransformPipelinePhysicalFunction.hpp new file mode 100644 index 0000000000..7e2a4ad48c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoTransformPipelinePhysicalFunction.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 `({std::string _s(wktPtr,wktSize),_ps(pipelinePtr,pipelineSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geo_transform_pipeline(_gs,const_cast(_ps.c_str()),(int32_t)srid_to,(bool)is_forward);free(_gs);_res;})`. + * + * Transform geometry through a coordinate pipeline. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoTransformPipelinePhysicalFunction : public PhysicalFunctionConcept { +public: + GeoTransformPipelinePhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction pipelineFunction, + PhysicalFunction srid_toFunction, + PhysicalFunction is_forwardFunction); + + 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/GeomBufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomBufferPhysicalFunction.hpp new file mode 100644 index 0000000000..7a9fd06d4a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomBufferPhysicalFunction.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 `({std::string _s(wktPtr,wktSize),_ps(paramsPtr,paramsSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geom_buffer(_gs,size,_ps.c_str());free(_gs);_res;})`. + * + * Compute the buffer zone around a geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomBufferPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomBufferPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction sizeFunction, + PhysicalFunction paramsFunction); + + 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/GeomFromHexewkbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomFromHexewkbPhysicalFunction.hpp new file mode 100644 index 0000000000..7ea234cd3d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomFromHexewkbPhysicalFunction.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_from_hexewkb(std::string(hexPtr,hexSize).c_str())`. + * + * Decode hex-EWKB string to geometry WKT. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomFromHexewkbPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomFromHexewkbPhysicalFunction(PhysicalFunction hexFunction); + + 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/GeomMinBoundingCenterPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomMinBoundingCenterPhysicalFunction.hpp new file mode 100644 index 0000000000..c0f9fc6b2a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomMinBoundingCenterPhysicalFunction.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 `({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);free(_gs);_mbc.center;})`. + * + * Centre of the minimum bounding circle of a geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomMinBoundingCenterPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomMinBoundingCenterPhysicalFunction(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/GeomMinBoundingRadiusPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomMinBoundingRadiusPhysicalFunction.hpp new file mode 100644 index 0000000000..875ab683c5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomMinBoundingRadiusPhysicalFunction.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 `({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0.0;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);double _r=_mbc.radius;if(_mbc.center)free(_mbc.center);free(_gs);_r;})`. + * + * Radius of the minimum bounding circle of a geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomMinBoundingRadiusPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomMinBoundingRadiusPhysicalFunction(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/GeomRelatePatternPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomRelatePatternPhysicalFunction.hpp new file mode 100644 index 0000000000..8aeb06fa17 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomRelatePatternPhysicalFunction.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 `({std::string _s1(wkt1Ptr,wkt1Size),_s2(wkt2Ptr,wkt2Size),_sp(patternPtr,patternSize);GSERIALIZED* _gs1=geom_in(_s1.c_str(),-1);if(!_gs1)return 0.0;GSERIALIZED* _gs2=geom_in(_s2.c_str(),-1);if(!_gs2){free(_gs1);return 0.0;}bool _r=geom_relate_pattern(_gs1,_gs2,const_cast(_sp.c_str()));free(_gs1);free(_gs2);_r?1.0:0.0;})`. + * + * Test DE-9IM relation pattern between two geometries. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomRelatePatternPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomRelatePatternPhysicalFunction(PhysicalFunction wkt1Function, + PhysicalFunction wkt2Function, + PhysicalFunction patternFunction); + + 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/H3GsPointToCellPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3GsPointToCellPhysicalFunction.hpp new file mode 100644 index 0000000000..74e2e13f6d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3GsPointToCellPhysicalFunction.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 `({std::string _wkt=fmt::format("SRID=4326;POINT({} {})",lon,lat);GSERIALIZED* _gs=geom_in(_wkt.c_str(),-1);if(!_gs)return 0u;H3Index _cell=h3_gs_point_to_cell(_gs,(int32_t)res);free(_gs);_cell;})`. + * + * Map (lon,lat) point to H3 cell at given resolution. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3GsPointToCellPhysicalFunction : public PhysicalFunctionConcept { +public: + H3GsPointToCellPhysicalFunction(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/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/H3indexInPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexInPhysicalFunction.hpp new file mode 100644 index 0000000000..e6bf23ff79 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexInPhysicalFunction.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 `(uint64_t)h3index_in(std::string(hexPtr,hexSize).c_str())`. + * + * Parse H3 cell index from a hex string. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexInPhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexInPhysicalFunction(PhysicalFunction hexFunction); + + 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/IntspanMakePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/IntspanMakePhysicalFunction.hpp new file mode 100644 index 0000000000..4efcd00d0c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/IntspanMakePhysicalFunction.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 `({Span* _sp=intspan_make((int)lower,(int)upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=intspan_out(_sp);free(_sp);_out;})`. + * + * Construct an integer span from bounds and inclusivity flags. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class IntspanMakePhysicalFunction : public PhysicalFunctionConcept { +public: + IntspanMakePhysicalFunction(PhysicalFunction lowerFunction, + PhysicalFunction upperFunction, + PhysicalFunction lower_incFunction, + PhysicalFunction upper_incFunction); + + 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/JsonArrayElementTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonArrayElementTextPhysicalFunction.hpp new file mode 100644 index 0000000000..40531f4bbf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonArrayElementTextPhysicalFunction.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 `({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_array_element_text(_js,(int)idx);free(_js);_res;})`. + * + * Text value of a JSON array element at a given index. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonArrayElementTextPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonArrayElementTextPhysicalFunction(PhysicalFunction jsonFunction, + PhysicalFunction idxFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonArrayLengthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonArrayLengthPhysicalFunction.hpp new file mode 100644 index 0000000000..f970d9b755 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonArrayLengthPhysicalFunction.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 `({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0.0;int _n=json_array_length(_js);free(_js);(double)_n;})`. + * + * Number of elements in a JSON array. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonArrayLengthPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonArrayLengthPhysicalFunction(PhysicalFunction jsonFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonObjectFieldTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonObjectFieldTextPhysicalFunction.hpp new file mode 100644 index 0000000000..9c75df20f5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonObjectFieldTextPhysicalFunction.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 `({std::string _sj(jsonPtr,jsonSize),_sk(keyPtr,keySize);text* _js=json_in(_sj.c_str());if(!_js)return 0u;text* _key=cstring_to_text(_sk.c_str());text* _res=json_object_field_text(_js,_key);free(_js);free(_key);_res;})`. + * + * Text value of a JSON object field by key. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonObjectFieldTextPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonObjectFieldTextPhysicalFunction(PhysicalFunction jsonFunction, + PhysicalFunction keyFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonTypeofPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonTypeofPhysicalFunction.hpp new file mode 100644 index 0000000000..12ec8afea5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonTypeofPhysicalFunction.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 `({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_typeof(_js);free(_js);_res;})`. + * + * Data type of the outermost JSON element. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonTypeofPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonTypeofPhysicalFunction(PhysicalFunction jsonFunction); + + 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/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/NadTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..0009a6470e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTcbufferCbufferPhysicalFunction.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. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTcbufferCbufferPhysicalFunction(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/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/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/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/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/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/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/NadTpcpointGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTpcpointGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..43a8194e7a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTpcpointGeoPhysicalFunction.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 `({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}double _r=nad_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r;})`. + * + * Nearest-approach distance for a tpcpoint instant and a geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTpcpointGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTpcpointGeoPhysicalFunction(PhysicalFunction pt_hexwkbFunction, + PhysicalFunction tsFunction, + PhysicalFunction tgt_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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/TeqFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..e33aefcee9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqFloatTfloatPhysicalFunction.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_float_tfloat`. + * + * Per-event teq_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqFloatTfloatPhysicalFunction(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/TeqIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..32bd41bb5f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqIntTintPhysicalFunction.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_int_tint`. + * + * Per-event teq_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqIntTintPhysicalFunction(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/TeqTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..16903017db --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqTemporalTemporalPhysicalFunction.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 `teq_temporal_temporal`. + * + * Per-event teq_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqTemporalTemporalPhysicalFunction(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..c303e128f8 --- /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`. + * + * Per-event teq_text_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/TeqTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..4a7c58787b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqTfloatFloatPhysicalFunction.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_tfloat_float`. + * + * Per-event teq_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqTfloatFloatPhysicalFunction(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/TeqTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..bc880bf054 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqTintIntPhysicalFunction.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_tint_int`. + * + * Per-event teq_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqTintIntPhysicalFunction(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/TeqTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..ee869b5447 --- /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`. + * + * Per-event teq_ttext_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/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/TfloatCosPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatCosPhysicalFunction.hpp new file mode 100644 index 0000000000..f253a0938a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatCosPhysicalFunction.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_cos`. + * + * Per-event tfloat_cos. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatCosPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatCosPhysicalFunction(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/TfloatDegreesPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatDegreesPhysicalFunction.hpp new file mode 100644 index 0000000000..23f6c8ac82 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatDegreesPhysicalFunction.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_degrees`. + * + * Per-event tfloat_degrees. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatDegreesPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatDegreesPhysicalFunction(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/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/TfloatSinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatSinPhysicalFunction.hpp new file mode 100644 index 0000000000..33ad866206 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatSinPhysicalFunction.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_sin`. + * + * Per-event tfloat_sin. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatSinPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatSinPhysicalFunction(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/TfloatTanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatTanPhysicalFunction.hpp new file mode 100644 index 0000000000..343fb02b2b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatTanPhysicalFunction.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_tan`. + * + * Per-event tfloat_tan. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatTanPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatTanPhysicalFunction(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/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/TgeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..a9394384d2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgeFloatTfloatPhysicalFunction.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_float_tfloat`. + * + * Per-event tge_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TgeFloatTfloatPhysicalFunction(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/TgeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..a7a506d8f7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgeIntTintPhysicalFunction.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_int_tint`. + * + * Per-event tge_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TgeIntTintPhysicalFunction(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/TgeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..4c0f643610 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgeTemporalTemporalPhysicalFunction.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 `tge_temporal_temporal`. + * + * Per-event tge_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + TgeTemporalTemporalPhysicalFunction(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/TgeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..6838659c6e --- /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`. + * + * Per-event tge_text_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/TgeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..102812af44 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgeTfloatFloatPhysicalFunction.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_tfloat_float`. + * + * Per-event tge_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TgeTfloatFloatPhysicalFunction(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/TgeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..845171edc1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgeTintIntPhysicalFunction.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_tint_int`. + * + * Per-event tge_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TgeTintIntPhysicalFunction(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/TgeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..371d78bb77 --- /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`. + * + * Per-event tge_ttext_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/TgtFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..d7dd340dff --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgtFloatTfloatPhysicalFunction.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_float_tfloat`. + * + * Per-event tgt_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgtFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TgtFloatTfloatPhysicalFunction(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/TgtIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..8ea7ff0ebf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgtIntTintPhysicalFunction.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_int_tint`. + * + * Per-event tgt_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgtIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TgtIntTintPhysicalFunction(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/TgtTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..4985d040ad --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgtTemporalTemporalPhysicalFunction.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 `tgt_temporal_temporal`. + * + * Per-event tgt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgtTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + TgtTemporalTemporalPhysicalFunction(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/TgtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..ee64a1a472 --- /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`. + * + * Per-event tgt_text_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/TgtTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..90030f05d0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgtTfloatFloatPhysicalFunction.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_tfloat_float`. + * + * Per-event tgt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgtTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TgtTfloatFloatPhysicalFunction(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/TgtTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..2908128081 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TgtTintIntPhysicalFunction.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_tint_int`. + * + * Per-event tgt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TgtTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TgtTintIntPhysicalFunction(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/TgtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TgtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..2cbcee615e --- /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`. + * + * Per-event tgt_ttext_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/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/TleFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..b7c9f3200b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TleFloatTfloatPhysicalFunction.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_float_tfloat`. + * + * Per-event tle_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TleFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TleFloatTfloatPhysicalFunction(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/TleIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..ec51a3263e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TleIntTintPhysicalFunction.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_int_tint`. + * + * Per-event tle_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TleIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TleIntTintPhysicalFunction(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/TleTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..46307b856c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TleTemporalTemporalPhysicalFunction.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 `tle_temporal_temporal`. + * + * Per-event tle_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TleTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + TleTemporalTemporalPhysicalFunction(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/TleTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..bef737ecc3 --- /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`. + * + * Per-event tle_text_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/TleTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..b7845100e0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TleTfloatFloatPhysicalFunction.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_tfloat_float`. + * + * Per-event tle_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TleTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TleTfloatFloatPhysicalFunction(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/TleTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..fb22140892 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TleTintIntPhysicalFunction.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_tint_int`. + * + * Per-event tle_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TleTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TleTintIntPhysicalFunction(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/TleTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TleTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..4509410c29 --- /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`. + * + * Per-event tle_ttext_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/TltFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..9309ffb394 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TltFloatTfloatPhysicalFunction.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_float_tfloat`. + * + * Per-event tlt_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TltFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TltFloatTfloatPhysicalFunction(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/TltIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..766baed87d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TltIntTintPhysicalFunction.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_int_tint`. + * + * Per-event tlt_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TltIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TltIntTintPhysicalFunction(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/TltTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..9e7b8657a7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TltTemporalTemporalPhysicalFunction.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 `tlt_temporal_temporal`. + * + * Per-event tlt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TltTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + TltTemporalTemporalPhysicalFunction(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/TltTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..e8e4af3b5e --- /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`. + * + * Per-event tlt_text_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/TltTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..7ee4282ca2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TltTfloatFloatPhysicalFunction.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_tfloat_float`. + * + * Per-event tlt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TltTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TltTfloatFloatPhysicalFunction(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/TltTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..76d0305c3a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TltTintIntPhysicalFunction.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_tint_int`. + * + * Per-event tlt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TltTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TltTintIntPhysicalFunction(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/TltTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TltTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..43b9c795ec --- /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`. + * + * Per-event tlt_ttext_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/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/TneFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..3f6a9780bc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneFloatTfloatPhysicalFunction.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_float_tfloat`. + * + * Per-event tne_float_tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TneFloatTfloatPhysicalFunction(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/TneIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..8598d24e99 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneIntTintPhysicalFunction.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_int_tint`. + * + * Per-event tne_int_tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TneIntTintPhysicalFunction(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/TneTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..e5f9ce1209 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneTemporalTemporalPhysicalFunction.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 `tne_temporal_temporal`. + * + * Per-event tne_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + TneTemporalTemporalPhysicalFunction(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/TneTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..dddffc96fb --- /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`. + * + * Per-event tne_text_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/TneTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..35850e5173 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneTfloatFloatPhysicalFunction.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_tfloat_float`. + * + * Per-event tne_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TneTfloatFloatPhysicalFunction(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/TneTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..8c016744d1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneTintIntPhysicalFunction.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_tint_int`. + * + * Per-event tne_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TneTintIntPhysicalFunction(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/TneTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..04c38e1b77 --- /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`. + * + * Per-event tne_ttext_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/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/TnumberAbsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TnumberAbsPhysicalFunction.hpp new file mode 100644 index 0000000000..55020ae63d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TnumberAbsPhysicalFunction.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 `tnumber_abs`. + * + * Per-event tnumber_abs. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TnumberAbsPhysicalFunction : public PhysicalFunctionConcept { +public: + TnumberAbsPhysicalFunction(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/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/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/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/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/AcontainsTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..43125206b2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferCbufferPhysicalFunction.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 { + +AcontainsTcbufferCbufferPhysicalFunction::AcontainsTcbufferCbufferPhysicalFunction(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 AcontainsTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterAcontainsTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AcontainsTcbufferCbufferPhysicalFunction 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 AcontainsTcbufferCbufferPhysicalFunction(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/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/AcoversGeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversGeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..367e7060bf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversGeoTgeoPhysicalFunction.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 { + +AcoversGeoTgeoPhysicalFunction::AcoversGeoTgeoPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AcoversGeoTgeoPhysicalFunction::execute(const Record& 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) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return 0; } + + int r = acovers_geo_tgeo(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversGeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AcoversGeoTgeoPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AcoversGeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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/AcoversTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..a71d212e6b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversTcbufferCbufferPhysicalFunction.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 { + +AcoversTcbufferCbufferPhysicalFunction::AcoversTcbufferCbufferPhysicalFunction(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 AcoversTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterAcoversTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AcoversTcbufferCbufferPhysicalFunction 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 AcoversTcbufferCbufferPhysicalFunction(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/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/AdisjointTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..d9f24d134e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferCbufferPhysicalFunction.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 { + +AdisjointTcbufferCbufferPhysicalFunction::AdisjointTcbufferCbufferPhysicalFunction(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 AdisjointTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterAdisjointTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AdisjointTcbufferCbufferPhysicalFunction 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 AdisjointTcbufferCbufferPhysicalFunction(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/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/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/AintersectsTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..a0b6dd245e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferCbufferPhysicalFunction.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 { + +AintersectsTcbufferCbufferPhysicalFunction::AintersectsTcbufferCbufferPhysicalFunction(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 AintersectsTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterAintersectsTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AintersectsTcbufferCbufferPhysicalFunction 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 AintersectsTcbufferCbufferPhysicalFunction(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/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/AlwaysEqQuadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqQuadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..1e010bad62 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqQuadbinTquadbinPhysicalFunction.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 { + +AlwaysEqQuadbinTquadbinPhysicalFunction::AlwaysEqQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(cell1Function)); + parameterFunctions.push_back(std::move(ts1Function)); +} + +VarVal AlwaysEqQuadbinTquadbinPhysicalFunction::execute(const Record& 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 cell1 = parameterValues[1].cast>(); + auto ts1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t arg0, + uint64_t cell1, + uint64_t ts1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* inst1 = (Temporal*)tquadbininst_make((Quadbin)cell1, (TimestampTz)ts1); + if (!inst1) { return 0.0; } + + double r = always_eq_quadbin_tquadbin((Quadbin)arg0, inst1); + free(inst1); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, cell1, ts1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqQuadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqQuadbinTquadbinPhysicalFunction 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 AlwaysEqQuadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/AlwaysEqTquadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTquadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..bb13fa96c9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTquadbinTquadbinPhysicalFunction.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 { + +AlwaysEqTquadbinTquadbinPhysicalFunction::AlwaysEqTquadbinTquadbinPhysicalFunction(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 AlwaysEqTquadbinTquadbinPhysicalFunction::execute(const Record& 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 = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + Temporal* inst0 = (Temporal*)tquadbininst_make((Quadbin)cell0, (TimestampTz)ts0); + if (!inst0) { free(temp); return 0.0; } + + double r = always_eq_tquadbin_tquadbin(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, cell0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTquadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AlwaysEqTquadbinTquadbinPhysicalFunction 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 AlwaysEqTquadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/AlwaysNeQuadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeQuadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..b81af89cd5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeQuadbinTquadbinPhysicalFunction.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 { + +AlwaysNeQuadbinTquadbinPhysicalFunction::AlwaysNeQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(cell1Function)); + parameterFunctions.push_back(std::move(ts1Function)); +} + +VarVal AlwaysNeQuadbinTquadbinPhysicalFunction::execute(const Record& 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 cell1 = parameterValues[1].cast>(); + auto ts1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t arg0, + uint64_t cell1, + uint64_t ts1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* inst1 = (Temporal*)tquadbininst_make((Quadbin)cell1, (TimestampTz)ts1); + if (!inst1) { return 0.0; } + + double r = always_ne_quadbin_tquadbin((Quadbin)arg0, inst1); + free(inst1); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, cell1, ts1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeQuadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeQuadbinTquadbinPhysicalFunction 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 AlwaysNeQuadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/AlwaysNeTquadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTquadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..bd3fb72188 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTquadbinTquadbinPhysicalFunction.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 { + +AlwaysNeTquadbinTquadbinPhysicalFunction::AlwaysNeTquadbinTquadbinPhysicalFunction(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 AlwaysNeTquadbinTquadbinPhysicalFunction::execute(const Record& 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 = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + Temporal* inst0 = (Temporal*)tquadbininst_make((Quadbin)cell0, (TimestampTz)ts0); + if (!inst0) { free(temp); return 0.0; } + + double r = always_ne_tquadbin_tquadbin(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, cell0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTquadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AlwaysNeTquadbinTquadbinPhysicalFunction 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 AlwaysNeTquadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/AtouchesTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..e999b26c30 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferCbufferPhysicalFunction.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 { + +AtouchesTcbufferCbufferPhysicalFunction::AtouchesTcbufferCbufferPhysicalFunction(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 AtouchesTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterAtouchesTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AtouchesTcbufferCbufferPhysicalFunction 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 AtouchesTcbufferCbufferPhysicalFunction(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/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/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/CMakeLists.txt b/nes-physical-operators/src/Functions/Meos/CMakeLists.txt index 516cdce4c3..05ed4393d2 100644 --- a/nes-physical-operators/src/Functions/Meos/CMakeLists.txt +++ b/nes-physical-operators/src/Functions/Meos/CMakeLists.txt @@ -10,9 +10,620 @@ # 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) +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(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(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(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(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(EcoversTcbufferTcbuffer PhysicalFunction nes-physical-operators EcoversTcbufferTcbufferPhysicalFunction.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(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(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(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(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(AcontainsTcbufferCbuffer PhysicalFunction nes-physical-operators AcontainsTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AcoversTcbufferCbuffer PhysicalFunction nes-physical-operators AcoversTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AdisjointTcbufferCbuffer PhysicalFunction nes-physical-operators AdisjointTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AintersectsTcbufferCbuffer PhysicalFunction nes-physical-operators AintersectsTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AtouchesTcbufferCbuffer PhysicalFunction nes-physical-operators AtouchesTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EcontainsTcbufferCbuffer PhysicalFunction nes-physical-operators EcontainsTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EcoversTcbufferCbuffer PhysicalFunction nes-physical-operators EcoversTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EdisjointTcbufferCbuffer PhysicalFunction nes-physical-operators EdisjointTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EintersectsTcbufferCbuffer PhysicalFunction nes-physical-operators EintersectsTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EtouchesTcbufferCbuffer PhysicalFunction nes-physical-operators EtouchesTcbufferCbufferPhysicalFunction.cpp) +add_plugin(NadTcbufferCbuffer PhysicalFunction nes-physical-operators NadTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AlwaysEqTquadbinTquadbin PhysicalFunction nes-physical-operators AlwaysEqTquadbinTquadbinPhysicalFunction.cpp) +add_plugin(AlwaysNeTquadbinTquadbin PhysicalFunction nes-physical-operators AlwaysNeTquadbinTquadbinPhysicalFunction.cpp) +add_plugin(EverEqTquadbinTquadbin PhysicalFunction nes-physical-operators EverEqTquadbinTquadbinPhysicalFunction.cpp) +add_plugin(EverNeTquadbinTquadbin PhysicalFunction nes-physical-operators EverNeTquadbinTquadbinPhysicalFunction.cpp) +add_plugin(AlwaysEqQuadbinTquadbin PhysicalFunction nes-physical-operators AlwaysEqQuadbinTquadbinPhysicalFunction.cpp) +add_plugin(AlwaysNeQuadbinTquadbin PhysicalFunction nes-physical-operators AlwaysNeQuadbinTquadbinPhysicalFunction.cpp) +add_plugin(EverEqQuadbinTquadbin PhysicalFunction nes-physical-operators EverEqQuadbinTquadbinPhysicalFunction.cpp) +add_plugin(EverNeQuadbinTquadbin PhysicalFunction nes-physical-operators EverNeQuadbinTquadbinPhysicalFunction.cpp) +add_plugin(AcoversGeoTgeo PhysicalFunction nes-physical-operators AcoversGeoTgeoPhysicalFunction.cpp) +add_plugin(TfloatCos PhysicalFunction nes-physical-operators TfloatCosPhysicalFunction.cpp) +add_plugin(TfloatSin PhysicalFunction nes-physical-operators TfloatSinPhysicalFunction.cpp) +add_plugin(TfloatTan PhysicalFunction nes-physical-operators TfloatTanPhysicalFunction.cpp) +add_plugin(TfloatDegrees PhysicalFunction nes-physical-operators TfloatDegreesPhysicalFunction.cpp) +add_plugin(TnumberAbs PhysicalFunction nes-physical-operators TnumberAbsPhysicalFunction.cpp) +add_plugin(TeqTfloatFloat PhysicalFunction nes-physical-operators TeqTfloatFloatPhysicalFunction.cpp) +add_plugin(TeqFloatTfloat PhysicalFunction nes-physical-operators TeqFloatTfloatPhysicalFunction.cpp) +add_plugin(TeqTintInt PhysicalFunction nes-physical-operators TeqTintIntPhysicalFunction.cpp) +add_plugin(TeqIntTint PhysicalFunction nes-physical-operators TeqIntTintPhysicalFunction.cpp) +add_plugin(TeqTtextText PhysicalFunction nes-physical-operators TeqTtextTextPhysicalFunction.cpp) +add_plugin(TeqTextTtext PhysicalFunction nes-physical-operators TeqTextTtextPhysicalFunction.cpp) +add_plugin(TeqTemporalTemporal PhysicalFunction nes-physical-operators TeqTemporalTemporalPhysicalFunction.cpp) +add_plugin(TneTfloatFloat PhysicalFunction nes-physical-operators TneTfloatFloatPhysicalFunction.cpp) +add_plugin(TneFloatTfloat PhysicalFunction nes-physical-operators TneFloatTfloatPhysicalFunction.cpp) +add_plugin(TneTintInt PhysicalFunction nes-physical-operators TneTintIntPhysicalFunction.cpp) +add_plugin(TneIntTint PhysicalFunction nes-physical-operators TneIntTintPhysicalFunction.cpp) +add_plugin(TneTtextText PhysicalFunction nes-physical-operators TneTtextTextPhysicalFunction.cpp) +add_plugin(TneTextTtext PhysicalFunction nes-physical-operators TneTextTtextPhysicalFunction.cpp) +add_plugin(TneTemporalTemporal PhysicalFunction nes-physical-operators TneTemporalTemporalPhysicalFunction.cpp) +add_plugin(TltTfloatFloat PhysicalFunction nes-physical-operators TltTfloatFloatPhysicalFunction.cpp) +add_plugin(TltFloatTfloat PhysicalFunction nes-physical-operators TltFloatTfloatPhysicalFunction.cpp) +add_plugin(TltTintInt PhysicalFunction nes-physical-operators TltTintIntPhysicalFunction.cpp) +add_plugin(TltIntTint PhysicalFunction nes-physical-operators TltIntTintPhysicalFunction.cpp) +add_plugin(TltTtextText PhysicalFunction nes-physical-operators TltTtextTextPhysicalFunction.cpp) +add_plugin(TltTextTtext PhysicalFunction nes-physical-operators TltTextTtextPhysicalFunction.cpp) +add_plugin(TltTemporalTemporal PhysicalFunction nes-physical-operators TltTemporalTemporalPhysicalFunction.cpp) +add_plugin(TleTfloatFloat PhysicalFunction nes-physical-operators TleTfloatFloatPhysicalFunction.cpp) +add_plugin(TleFloatTfloat PhysicalFunction nes-physical-operators TleFloatTfloatPhysicalFunction.cpp) +add_plugin(TleTintInt PhysicalFunction nes-physical-operators TleTintIntPhysicalFunction.cpp) +add_plugin(TleIntTint PhysicalFunction nes-physical-operators TleIntTintPhysicalFunction.cpp) +add_plugin(TleTtextText PhysicalFunction nes-physical-operators TleTtextTextPhysicalFunction.cpp) +add_plugin(TleTextTtext PhysicalFunction nes-physical-operators TleTextTtextPhysicalFunction.cpp) +add_plugin(TleTemporalTemporal PhysicalFunction nes-physical-operators TleTemporalTemporalPhysicalFunction.cpp) +add_plugin(TgtTfloatFloat PhysicalFunction nes-physical-operators TgtTfloatFloatPhysicalFunction.cpp) +add_plugin(TgtFloatTfloat PhysicalFunction nes-physical-operators TgtFloatTfloatPhysicalFunction.cpp) +add_plugin(TgtTintInt PhysicalFunction nes-physical-operators TgtTintIntPhysicalFunction.cpp) +add_plugin(TgtIntTint PhysicalFunction nes-physical-operators TgtIntTintPhysicalFunction.cpp) +add_plugin(TgtTtextText PhysicalFunction nes-physical-operators TgtTtextTextPhysicalFunction.cpp) +add_plugin(TgtTextTtext PhysicalFunction nes-physical-operators TgtTextTtextPhysicalFunction.cpp) +add_plugin(TgtTemporalTemporal PhysicalFunction nes-physical-operators TgtTemporalTemporalPhysicalFunction.cpp) +add_plugin(TgeTfloatFloat PhysicalFunction nes-physical-operators TgeTfloatFloatPhysicalFunction.cpp) +add_plugin(TgeFloatTfloat PhysicalFunction nes-physical-operators TgeFloatTfloatPhysicalFunction.cpp) +add_plugin(TgeTintInt PhysicalFunction nes-physical-operators TgeTintIntPhysicalFunction.cpp) +add_plugin(TgeIntTint PhysicalFunction nes-physical-operators TgeIntTintPhysicalFunction.cpp) +add_plugin(TgeTtextText PhysicalFunction nes-physical-operators TgeTtextTextPhysicalFunction.cpp) +add_plugin(TgeTextTtext PhysicalFunction nes-physical-operators TgeTextTtextPhysicalFunction.cpp) +add_plugin(TgeTemporalTemporal PhysicalFunction nes-physical-operators TgeTemporalTemporalPhysicalFunction.cpp) +add_plugin(GeoFromGeojson PhysicalFunction nes-physical-operators GeoFromGeojsonPhysicalFunction.cpp) +add_plugin(GeomFromHexewkb PhysicalFunction nes-physical-operators GeomFromHexewkbPhysicalFunction.cpp) +add_plugin(GeoAsHexewkb PhysicalFunction nes-physical-operators GeoAsHexewkbPhysicalFunction.cpp) +add_plugin(GeomMinBoundingCenter PhysicalFunction nes-physical-operators GeomMinBoundingCenterPhysicalFunction.cpp) +add_plugin(GeomMinBoundingRadius PhysicalFunction nes-physical-operators GeomMinBoundingRadiusPhysicalFunction.cpp) +add_plugin(GeoTransformPipeline PhysicalFunction nes-physical-operators GeoTransformPipelinePhysicalFunction.cpp) +add_plugin(GeomBuffer PhysicalFunction nes-physical-operators GeomBufferPhysicalFunction.cpp) +add_plugin(GeomRelatePattern PhysicalFunction nes-physical-operators GeomRelatePatternPhysicalFunction.cpp) +add_plugin(H3GsPointToCell PhysicalFunction nes-physical-operators H3GsPointToCellPhysicalFunction.cpp) +add_plugin(H3indexIn PhysicalFunction nes-physical-operators H3indexInPhysicalFunction.cpp) +add_plugin(EintersectsTpcpointGeo PhysicalFunction nes-physical-operators EintersectsTpcpointGeoPhysicalFunction.cpp) +add_plugin(NadTpcpointGeo PhysicalFunction nes-physical-operators NadTpcpointGeoPhysicalFunction.cpp) +add_plugin(JsonArrayLength PhysicalFunction nes-physical-operators JsonArrayLengthPhysicalFunction.cpp) +add_plugin(JsonTypeof PhysicalFunction nes-physical-operators JsonTypeofPhysicalFunction.cpp) +add_plugin(JsonArrayElementText PhysicalFunction nes-physical-operators JsonArrayElementTextPhysicalFunction.cpp) +add_plugin(JsonObjectFieldText PhysicalFunction nes-physical-operators JsonObjectFieldTextPhysicalFunction.cpp) +add_plugin(FloatspanMake PhysicalFunction nes-physical-operators FloatspanMakePhysicalFunction.cpp) +add_plugin(IntspanMake PhysicalFunction nes-physical-operators IntspanMakePhysicalFunction.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/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/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/EcontainsTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..a5b77bec3d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferCbufferPhysicalFunction.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 { + +EcontainsTcbufferCbufferPhysicalFunction::EcontainsTcbufferCbufferPhysicalFunction(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 EcontainsTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterEcontainsTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EcontainsTcbufferCbufferPhysicalFunction 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 EcontainsTcbufferCbufferPhysicalFunction(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/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/EcoversTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..e5352a461a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversTcbufferCbufferPhysicalFunction.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 { + +EcoversTcbufferCbufferPhysicalFunction::EcoversTcbufferCbufferPhysicalFunction(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 EcoversTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterEcoversTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EcoversTcbufferCbufferPhysicalFunction 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 EcoversTcbufferCbufferPhysicalFunction(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/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/EdisjointTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..1fdc3184c4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferCbufferPhysicalFunction.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 { + +EdisjointTcbufferCbufferPhysicalFunction::EdisjointTcbufferCbufferPhysicalFunction(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 EdisjointTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterEdisjointTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EdisjointTcbufferCbufferPhysicalFunction 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 EdisjointTcbufferCbufferPhysicalFunction(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/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/EintersectsTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..505ac302b2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferCbufferPhysicalFunction.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 { + +EintersectsTcbufferCbufferPhysicalFunction::EintersectsTcbufferCbufferPhysicalFunction(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 EintersectsTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterEintersectsTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EintersectsTcbufferCbufferPhysicalFunction 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 EintersectsTcbufferCbufferPhysicalFunction(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/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/EintersectsTpcpointGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTpcpointGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..c6ddd23094 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTpcpointGeoPhysicalFunction.cpp @@ -0,0 +1,95 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing 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 { + +EintersectsTpcpointGeoPhysicalFunction::EintersectsTpcpointGeoPhysicalFunction(PhysicalFunction pt_hexwkbFunction, + PhysicalFunction tsFunction, + PhysicalFunction tgt_wktFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(pt_hexwkbFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(tgt_wktFunction)); +} + +VarVal EintersectsTpcpointGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto pt_hexwkb = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto tgt_wkt = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* pt_hexwkbPtr, uint32_t pt_hexwkbSize, + uint64_t ts, + const char* tgt_wktPtr, uint32_t tgt_wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = ({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}bool _r=eintersects_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r?1.0:0.0;}); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + pt_hexwkb.getContent(), pt_hexwkb.getContentSize(), ts, tgt_wkt.getContent(), tgt_wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTpcpointGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EintersectsTpcpointGeoPhysicalFunction 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 EintersectsTpcpointGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/EtouchesTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..ac9026b28f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferCbufferPhysicalFunction.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 { + +EtouchesTcbufferCbufferPhysicalFunction::EtouchesTcbufferCbufferPhysicalFunction(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 EtouchesTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterEtouchesTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EtouchesTcbufferCbufferPhysicalFunction 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 EtouchesTcbufferCbufferPhysicalFunction(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/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/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/EverEqQuadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqQuadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..bd0f176f58 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqQuadbinTquadbinPhysicalFunction.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 { + +EverEqQuadbinTquadbinPhysicalFunction::EverEqQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(cell1Function)); + parameterFunctions.push_back(std::move(ts1Function)); +} + +VarVal EverEqQuadbinTquadbinPhysicalFunction::execute(const Record& 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 cell1 = parameterValues[1].cast>(); + auto ts1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t arg0, + uint64_t cell1, + uint64_t ts1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* inst1 = (Temporal*)tquadbininst_make((Quadbin)cell1, (TimestampTz)ts1); + if (!inst1) { return 0.0; } + + double r = ever_eq_quadbin_tquadbin((Quadbin)arg0, inst1); + free(inst1); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, cell1, ts1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqQuadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqQuadbinTquadbinPhysicalFunction 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 EverEqQuadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/EverEqTquadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTquadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..8d6d756192 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTquadbinTquadbinPhysicalFunction.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 { + +EverEqTquadbinTquadbinPhysicalFunction::EverEqTquadbinTquadbinPhysicalFunction(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 EverEqTquadbinTquadbinPhysicalFunction::execute(const Record& 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 = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + Temporal* inst0 = (Temporal*)tquadbininst_make((Quadbin)cell0, (TimestampTz)ts0); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_eq_tquadbin_tquadbin(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, cell0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTquadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EverEqTquadbinTquadbinPhysicalFunction 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 EverEqTquadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/EverNeQuadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeQuadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..18c3f39233 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeQuadbinTquadbinPhysicalFunction.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 { + +EverNeQuadbinTquadbinPhysicalFunction::EverNeQuadbinTquadbinPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction cell1Function, + PhysicalFunction ts1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(cell1Function)); + parameterFunctions.push_back(std::move(ts1Function)); +} + +VarVal EverNeQuadbinTquadbinPhysicalFunction::execute(const Record& 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 cell1 = parameterValues[1].cast>(); + auto ts1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t arg0, + uint64_t cell1, + uint64_t ts1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* inst1 = (Temporal*)tquadbininst_make((Quadbin)cell1, (TimestampTz)ts1); + if (!inst1) { return 0.0; } + + double r = ever_ne_quadbin_tquadbin((Quadbin)arg0, inst1); + free(inst1); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, cell1, ts1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeQuadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeQuadbinTquadbinPhysicalFunction 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 EverNeQuadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/EverNeTquadbinTquadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTquadbinTquadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..b79b3e3958 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTquadbinTquadbinPhysicalFunction.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 { + +EverNeTquadbinTquadbinPhysicalFunction::EverNeTquadbinTquadbinPhysicalFunction(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 EverNeTquadbinTquadbinPhysicalFunction::execute(const Record& 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 = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + Temporal* inst0 = (Temporal*)tquadbininst_make((Quadbin)cell0, (TimestampTz)ts0); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_ne_tquadbin_tquadbin(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, cell0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTquadbinTquadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EverNeTquadbinTquadbinPhysicalFunction 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 EverNeTquadbinTquadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/FloatspanMakePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FloatspanMakePhysicalFunction.cpp new file mode 100644 index 0000000000..1e52426136 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FloatspanMakePhysicalFunction.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 +} + +namespace NES { + +FloatspanMakePhysicalFunction::FloatspanMakePhysicalFunction(PhysicalFunction lowerFunction, + PhysicalFunction upperFunction, + PhysicalFunction lower_incFunction, + PhysicalFunction upper_incFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lowerFunction)); + parameterFunctions.push_back(std::move(upperFunction)); + parameterFunctions.push_back(std::move(lower_incFunction)); + parameterFunctions.push_back(std::move(upper_incFunction)); +} + +VarVal FloatspanMakePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lower = parameterValues[0].cast>(); + auto upper = parameterValues[1].cast>(); + auto lower_inc = parameterValues[2].cast>(); + auto upper_inc = parameterValues[3].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](double lower, + double upper, + double lower_inc, + double upper_inc, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + char* out = ({Span* _sp=floatspan_make(lower,upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=floatspan_out(_sp,-1);free(_sp);_out;}); + 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; + } + }, + lower, upper, lower_inc, upper_inc, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFloatspanMakePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "FloatspanMakePhysicalFunction 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 FloatspanMakePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/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/GeoAsHexewkbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoAsHexewkbPhysicalFunction.cpp new file mode 100644 index 0000000000..83da47a399 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoAsHexewkbPhysicalFunction.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 +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoAsHexewkbPhysicalFunction::GeoAsHexewkbPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction endianFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(endianFunction)); +} + +VarVal GeoAsHexewkbPhysicalFunction::execute(const Record& 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 endian = 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* endianPtr, uint32_t endianSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + char* out = ({std::string _s(wktPtr,wktSize),_es(endianPtr,endianSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;char* _out=geo_as_hexewkb(_gs,_es.c_str());free(_gs);_out;}); + 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(), endian.getContent(), endian.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoAsHexewkbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoAsHexewkbPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoAsHexewkbPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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/GeoFromGeojsonPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoFromGeojsonPhysicalFunction.cpp new file mode 100644 index 0000000000..72fd68fbca --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoFromGeojsonPhysicalFunction.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 +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoFromGeojsonPhysicalFunction::GeoFromGeojsonPhysicalFunction(PhysicalFunction jsonFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(jsonFunction)); +} + +VarVal GeoFromGeojsonPhysicalFunction::execute(const Record& 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 = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jsonPtr, uint32_t jsonSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = geo_from_geojson(std::string(jsonPtr,jsonSize).c_str()); + 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; + } + }, + json.getContent(), json.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoFromGeojsonPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoFromGeojsonPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoFromGeojsonPhysicalFunction(std::move(arg0)); +} + +} // 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/GeoTransformPipelinePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoTransformPipelinePhysicalFunction.cpp new file mode 100644 index 0000000000..a7022bb646 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoTransformPipelinePhysicalFunction.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 { + +GeoTransformPipelinePhysicalFunction::GeoTransformPipelinePhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction pipelineFunction, + PhysicalFunction srid_toFunction, + PhysicalFunction is_forwardFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(pipelineFunction)); + parameterFunctions.push_back(std::move(srid_toFunction)); + parameterFunctions.push_back(std::move(is_forwardFunction)); +} + +VarVal GeoTransformPipelinePhysicalFunction::execute(const Record& 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 pipeline = parameterValues[1].cast(); + auto srid_to = parameterValues[2].cast>(); + auto is_forward = parameterValues[3].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* pipelinePtr, uint32_t pipelineSize, + double srid_to, + double is_forward, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = ({std::string _s(wktPtr,wktSize),_ps(pipelinePtr,pipelineSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geo_transform_pipeline(_gs,const_cast(_ps.c_str()),(int32_t)srid_to,(bool)is_forward);free(_gs);_res;}); + 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(), pipeline.getContent(), pipeline.getContentSize(), srid_to, is_forward, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoTransformPipelinePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "GeoTransformPipelinePhysicalFunction 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 GeoTransformPipelinePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/GeomBufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomBufferPhysicalFunction.cpp new file mode 100644 index 0000000000..7c9ee3bc17 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomBufferPhysicalFunction.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 { + +GeomBufferPhysicalFunction::GeomBufferPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction sizeFunction, + PhysicalFunction paramsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(sizeFunction)); + parameterFunctions.push_back(std::move(paramsFunction)); +} + +VarVal GeomBufferPhysicalFunction::execute(const Record& 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 size = parameterValues[1].cast>(); + auto params = 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 size, + const char* paramsPtr, uint32_t paramsSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = ({std::string _s(wktPtr,wktSize),_ps(paramsPtr,paramsSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geom_buffer(_gs,size,_ps.c_str());free(_gs);_res;}); + 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(), size, params.getContent(), params.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomBufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeomBufferPhysicalFunction 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 GeomBufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/GeomFromHexewkbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomFromHexewkbPhysicalFunction.cpp new file mode 100644 index 0000000000..30a6a0c1bb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomFromHexewkbPhysicalFunction.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 +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomFromHexewkbPhysicalFunction::GeomFromHexewkbPhysicalFunction(PhysicalFunction hexFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(hexFunction)); +} + +VarVal GeomFromHexewkbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto hex = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* hexPtr, uint32_t hexSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = geom_from_hexewkb(std::string(hexPtr,hexSize).c_str()); + 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; + } + }, + hex.getContent(), hex.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomFromHexewkbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomFromHexewkbPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomFromHexewkbPhysicalFunction(std::move(arg0)); +} + +} // 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/GeomMinBoundingCenterPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomMinBoundingCenterPhysicalFunction.cpp new file mode 100644 index 0000000000..dd63dfceb6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomMinBoundingCenterPhysicalFunction.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 +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomMinBoundingCenterPhysicalFunction::GeomMinBoundingCenterPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomMinBoundingCenterPhysicalFunction::execute(const Record& 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(); + + GSERIALIZED* gres = ({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);free(_gs);_mbc.center;}); + 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::RegisterGeomMinBoundingCenterPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomMinBoundingCenterPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomMinBoundingCenterPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomMinBoundingRadiusPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomMinBoundingRadiusPhysicalFunction.cpp new file mode 100644 index 0000000000..b3b4d0e399 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomMinBoundingRadiusPhysicalFunction.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 { + +GeomMinBoundingRadiusPhysicalFunction::GeomMinBoundingRadiusPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomMinBoundingRadiusPhysicalFunction::execute(const Record& 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(); + + double r = ({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0.0;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);double _r=_mbc.radius;if(_mbc.center)free(_mbc.center);free(_gs);_r;}); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomMinBoundingRadiusPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomMinBoundingRadiusPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomMinBoundingRadiusPhysicalFunction(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/GeomRelatePatternPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomRelatePatternPhysicalFunction.cpp new file mode 100644 index 0000000000..6657cb7747 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomRelatePatternPhysicalFunction.cpp @@ -0,0 +1,94 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomRelatePatternPhysicalFunction::GeomRelatePatternPhysicalFunction(PhysicalFunction wkt1Function, + PhysicalFunction wkt2Function, + PhysicalFunction patternFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wkt1Function)); + parameterFunctions.push_back(std::move(wkt2Function)); + parameterFunctions.push_back(std::move(patternFunction)); +} + +VarVal GeomRelatePatternPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt1 = parameterValues[0].cast(); + auto wkt2 = parameterValues[1].cast(); + auto pattern = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* wkt1Ptr, uint32_t wkt1Size, + const char* wkt2Ptr, uint32_t wkt2Size, + const char* patternPtr, uint32_t patternSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = ({std::string _s1(wkt1Ptr,wkt1Size),_s2(wkt2Ptr,wkt2Size),_sp(patternPtr,patternSize);GSERIALIZED* _gs1=geom_in(_s1.c_str(),-1);if(!_gs1)return 0.0;GSERIALIZED* _gs2=geom_in(_s2.c_str(),-1);if(!_gs2){free(_gs1);return 0.0;}bool _r=geom_relate_pattern(_gs1,_gs2,const_cast(_sp.c_str()));free(_gs1);free(_gs2);_r?1.0:0.0;}); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt1.getContent(), wkt1.getContentSize(), wkt2.getContent(), wkt2.getContentSize(), pattern.getContent(), pattern.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomRelatePatternPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeomRelatePatternPhysicalFunction 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 GeomRelatePatternPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/H3GsPointToCellPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3GsPointToCellPhysicalFunction.cpp new file mode 100644 index 0000000000..78ece7e100 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3GsPointToCellPhysicalFunction.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 +#include +} + +namespace NES { + +H3GsPointToCellPhysicalFunction::H3GsPointToCellPhysicalFunction(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 H3GsPointToCellPhysicalFunction::execute(const Record& 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, + double res, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + H3Index hcell = ({std::string _wkt=fmt::format("SRID=4326;POINT({} {})",lon,lat);GSERIALIZED* _gs=geom_in(_wkt.c_str(),-1);if(!_gs)return 0u;H3Index _cell=h3_gs_point_to_cell(_gs,(int32_t)res);free(_gs);_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; + } + }, + lon, lat, res, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3GsPointToCellPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "H3GsPointToCellPhysicalFunction 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 H3GsPointToCellPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/H3indexInPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexInPhysicalFunction.cpp new file mode 100644 index 0000000000..a0442304ff --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexInPhysicalFunction.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 { + +H3indexInPhysicalFunction::H3indexInPhysicalFunction(PhysicalFunction hexFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(hexFunction)); +} + +VarVal H3indexInPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto hex = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* hexPtr, uint32_t hexSize) -> uint64_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + uint64_t r = (uint64_t)h3index_in(std::string(hexPtr,hexSize).c_str()); + return r; + } + catch (const std::exception&) + { + return 0ULL; + } + }, + hex.getContent(), hex.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexInPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "H3indexInPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return H3indexInPhysicalFunction(std::move(arg0)); +} + +} // 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/IntspanMakePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/IntspanMakePhysicalFunction.cpp new file mode 100644 index 0000000000..8c66da3477 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/IntspanMakePhysicalFunction.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 +} + +namespace NES { + +IntspanMakePhysicalFunction::IntspanMakePhysicalFunction(PhysicalFunction lowerFunction, + PhysicalFunction upperFunction, + PhysicalFunction lower_incFunction, + PhysicalFunction upper_incFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lowerFunction)); + parameterFunctions.push_back(std::move(upperFunction)); + parameterFunctions.push_back(std::move(lower_incFunction)); + parameterFunctions.push_back(std::move(upper_incFunction)); +} + +VarVal IntspanMakePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lower = parameterValues[0].cast>(); + auto upper = parameterValues[1].cast>(); + auto lower_inc = parameterValues[2].cast>(); + auto upper_inc = parameterValues[3].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](double lower, + double upper, + double lower_inc, + double upper_inc, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + char* out = ({Span* _sp=intspan_make((int)lower,(int)upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=intspan_out(_sp);free(_sp);_out;}); + 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; + } + }, + lower, upper, lower_inc, upper_inc, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterIntspanMakePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "IntspanMakePhysicalFunction 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 IntspanMakePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // 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/JsonArrayElementTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonArrayElementTextPhysicalFunction.cpp new file mode 100644 index 0000000000..cc8178a134 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonArrayElementTextPhysicalFunction.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 +#include +} + +namespace NES { + +JsonArrayElementTextPhysicalFunction::JsonArrayElementTextPhysicalFunction(PhysicalFunction jsonFunction, + PhysicalFunction idxFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jsonFunction)); + parameterFunctions.push_back(std::move(idxFunction)); +} + +VarVal JsonArrayElementTextPhysicalFunction::execute(const Record& 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 = parameterValues[0].cast(); + auto idx = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jsonPtr, uint32_t jsonSize, + double idx, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + text* tres = ({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_array_element_text(_js,(int)idx);free(_js);_res;}); + if (!tres) return 0u; + char* out = json_out(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; + } + }, + json.getContent(), json.getContentSize(), idx, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonArrayElementTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonArrayElementTextPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonArrayElementTextPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonArrayLengthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonArrayLengthPhysicalFunction.cpp new file mode 100644 index 0000000000..c9b19a4ca6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonArrayLengthPhysicalFunction.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 { + +JsonArrayLengthPhysicalFunction::JsonArrayLengthPhysicalFunction(PhysicalFunction jsonFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(jsonFunction)); +} + +VarVal JsonArrayLengthPhysicalFunction::execute(const Record& 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 = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* jsonPtr, uint32_t jsonSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = ({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0.0;int _n=json_array_length(_js);free(_js);(double)_n;}); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json.getContent(), json.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonArrayLengthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "JsonArrayLengthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return JsonArrayLengthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonObjectFieldTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonObjectFieldTextPhysicalFunction.cpp new file mode 100644 index 0000000000..54b01034e0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonObjectFieldTextPhysicalFunction.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 +#include +} + +namespace NES { + +JsonObjectFieldTextPhysicalFunction::JsonObjectFieldTextPhysicalFunction(PhysicalFunction jsonFunction, + PhysicalFunction keyFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jsonFunction)); + parameterFunctions.push_back(std::move(keyFunction)); +} + +VarVal JsonObjectFieldTextPhysicalFunction::execute(const Record& 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 = parameterValues[0].cast(); + auto key = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jsonPtr, uint32_t jsonSize, + const char* keyPtr, uint32_t keySize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + text* tres = ({std::string _sj(jsonPtr,jsonSize),_sk(keyPtr,keySize);text* _js=json_in(_sj.c_str());if(!_js)return 0u;text* _key=cstring_to_text(_sk.c_str());text* _res=json_object_field_text(_js,_key);free(_js);free(_key);_res;}); + if (!tres) return 0u; + char* out = json_out(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; + } + }, + json.getContent(), json.getContentSize(), key.getContent(), key.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonObjectFieldTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonObjectFieldTextPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonObjectFieldTextPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonTypeofPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonTypeofPhysicalFunction.cpp new file mode 100644 index 0000000000..3827e6f58c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonTypeofPhysicalFunction.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 +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonTypeofPhysicalFunction::JsonTypeofPhysicalFunction(PhysicalFunction jsonFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(jsonFunction)); +} + +VarVal JsonTypeofPhysicalFunction::execute(const Record& 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 = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jsonPtr, uint32_t jsonSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + text* tres = ({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_typeof(_js);free(_js);_res;}); + if (!tres) return 0u; + char* out = json_out(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; + } + }, + json.getContent(), json.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonTypeofPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "JsonTypeofPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return JsonTypeofPhysicalFunction(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/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/NadTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..4081434fef --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTcbufferCbufferPhysicalFunction.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 { + +NadTcbufferCbufferPhysicalFunction::NadTcbufferCbufferPhysicalFunction(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 NadTcbufferCbufferPhysicalFunction::execute(const Record& 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::RegisterNadTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "NadTcbufferCbufferPhysicalFunction 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 NadTcbufferCbufferPhysicalFunction(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/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/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/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/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/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/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/NadTpcpointGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTpcpointGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..21db8538bf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTpcpointGeoPhysicalFunction.cpp @@ -0,0 +1,95 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing 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 { + +NadTpcpointGeoPhysicalFunction::NadTpcpointGeoPhysicalFunction(PhysicalFunction pt_hexwkbFunction, + PhysicalFunction tsFunction, + PhysicalFunction tgt_wktFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(pt_hexwkbFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(tgt_wktFunction)); +} + +VarVal NadTpcpointGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto pt_hexwkb = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto tgt_wkt = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* pt_hexwkbPtr, uint32_t pt_hexwkbSize, + uint64_t ts, + const char* tgt_wktPtr, uint32_t tgt_wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = ({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}double _r=nad_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r;}); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + pt_hexwkb.getContent(), pt_hexwkb.getContentSize(), ts, tgt_wkt.getContent(), tgt_wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTpcpointGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "NadTpcpointGeoPhysicalFunction 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 NadTpcpointGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/TeqFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..39f026b9b1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqFloatTfloatPhysicalFunction.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 { + +TeqFloatTfloatPhysicalFunction::TeqFloatTfloatPhysicalFunction(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 TeqFloatTfloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = teq_float_tfloat(arg0, 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::RegisterTeqFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TeqFloatTfloatPhysicalFunction 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 TeqFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TeqIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..aa83dee873 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqIntTintPhysicalFunction.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 { + +TeqIntTintPhysicalFunction::TeqIntTintPhysicalFunction(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 TeqIntTintPhysicalFunction::execute(const Record& 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, + int32_t value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = teq_int_tint(static_cast(arg0), 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::RegisterTeqIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TeqIntTintPhysicalFunction 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 TeqIntTintPhysicalFunction(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/TeqTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..91a171ef40 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqTemporalTemporalPhysicalFunction.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 { + +TeqTemporalTemporalPhysicalFunction::TeqTemporalTemporalPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TeqTemporalTemporalPhysicalFunction::execute(const Record& 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 = teq_temporal_temporal(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::RegisterTeqTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TeqTemporalTemporalPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TeqTemporalTemporalPhysicalFunction(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..fa96bf498b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqTextTtextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = teq_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TeqTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..d2ffd1ace2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqTfloatFloatPhysicalFunction.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 { + +TeqTfloatFloatPhysicalFunction::TeqTfloatFloatPhysicalFunction(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 TeqTfloatFloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = teq_tfloat_float(temp, arg0); + 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::RegisterTeqTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TeqTfloatFloatPhysicalFunction 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 TeqTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TeqTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..4c7fae838e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqTintIntPhysicalFunction.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 { + +TeqTintIntPhysicalFunction::TeqTintIntPhysicalFunction(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 TeqTintIntPhysicalFunction::execute(const Record& 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, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = teq_tint_int(temp, static_cast(arg0)); + 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::RegisterTeqTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TeqTintIntPhysicalFunction 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 TeqTintIntPhysicalFunction(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..3906516023 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqTtextTextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = teq_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/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/TfloatCosPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatCosPhysicalFunction.cpp new file mode 100644 index 0000000000..6658a47009 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatCosPhysicalFunction.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 { + +TfloatCosPhysicalFunction::TfloatCosPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatCosPhysicalFunction::execute(const Record& 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_cos(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::RegisterTfloatCosPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatCosPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatCosPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatDegreesPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatDegreesPhysicalFunction.cpp new file mode 100644 index 0000000000..3226aab745 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatDegreesPhysicalFunction.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 { + +TfloatDegreesPhysicalFunction::TfloatDegreesPhysicalFunction(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 TfloatDegreesPhysicalFunction::execute(const Record& 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_degrees(temp, static_cast(arg0 != 0.0)); + 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::RegisterTfloatDegreesPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TfloatDegreesPhysicalFunction 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 TfloatDegreesPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // 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/TfloatSinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatSinPhysicalFunction.cpp new file mode 100644 index 0000000000..c51a755d18 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatSinPhysicalFunction.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 { + +TfloatSinPhysicalFunction::TfloatSinPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatSinPhysicalFunction::execute(const Record& 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_sin(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::RegisterTfloatSinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatSinPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatSinPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatTanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatTanPhysicalFunction.cpp new file mode 100644 index 0000000000..b5fc7be04a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatTanPhysicalFunction.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 { + +TfloatTanPhysicalFunction::TfloatTanPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatTanPhysicalFunction::execute(const Record& 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_tan(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::RegisterTfloatTanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatTanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatTanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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/TgeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..967ae4c35b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeFloatTfloatPhysicalFunction.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 { + +TgeFloatTfloatPhysicalFunction::TgeFloatTfloatPhysicalFunction(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 TgeFloatTfloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tge_float_tfloat(arg0, 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::RegisterTgeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgeFloatTfloatPhysicalFunction 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 TgeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TgeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..7d1f1ca224 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeIntTintPhysicalFunction.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 { + +TgeIntTintPhysicalFunction::TgeIntTintPhysicalFunction(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 TgeIntTintPhysicalFunction::execute(const Record& 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, + int32_t value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tge_int_tint(static_cast(arg0), 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::RegisterTgeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgeIntTintPhysicalFunction 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 TgeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TgeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..b117555475 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeTemporalTemporalPhysicalFunction.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 { + +TgeTemporalTemporalPhysicalFunction::TgeTemporalTemporalPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TgeTemporalTemporalPhysicalFunction::execute(const Record& 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 = tge_temporal_temporal(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::RegisterTgeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TgeTemporalTemporalPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TgeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..2acbdbe316 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeTextTtextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tge_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TgeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..0ab018673a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeTfloatFloatPhysicalFunction.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 { + +TgeTfloatFloatPhysicalFunction::TgeTfloatFloatPhysicalFunction(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 TgeTfloatFloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tge_tfloat_float(temp, arg0); + 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::RegisterTgeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgeTfloatFloatPhysicalFunction 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 TgeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TgeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..3deb08f5c3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeTintIntPhysicalFunction.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 { + +TgeTintIntPhysicalFunction::TgeTintIntPhysicalFunction(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 TgeTintIntPhysicalFunction::execute(const Record& 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, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tge_tint_int(temp, static_cast(arg0)); + 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::RegisterTgeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgeTintIntPhysicalFunction 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 TgeTintIntPhysicalFunction(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..849da8d196 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgeTtextTextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tge_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TgtFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgtFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..637a70f69a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtFloatTfloatPhysicalFunction.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 { + +TgtFloatTfloatPhysicalFunction::TgtFloatTfloatPhysicalFunction(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 TgtFloatTfloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tgt_float_tfloat(arg0, 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::RegisterTgtFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgtFloatTfloatPhysicalFunction 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 TgtFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TgtIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgtIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..f9daec0cd4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtIntTintPhysicalFunction.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 { + +TgtIntTintPhysicalFunction::TgtIntTintPhysicalFunction(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 TgtIntTintPhysicalFunction::execute(const Record& 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, + int32_t value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tgt_int_tint(static_cast(arg0), 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::RegisterTgtIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgtIntTintPhysicalFunction 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 TgtIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TgtTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgtTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..979a97e90a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtTemporalTemporalPhysicalFunction.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 { + +TgtTemporalTemporalPhysicalFunction::TgtTemporalTemporalPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TgtTemporalTemporalPhysicalFunction::execute(const Record& 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 = tgt_temporal_temporal(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::RegisterTgtTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TgtTemporalTemporalPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TgtTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..2fe22b96eb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtTextTtextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tgt_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TgtTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgtTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..2cc415ed91 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtTfloatFloatPhysicalFunction.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 { + +TgtTfloatFloatPhysicalFunction::TgtTfloatFloatPhysicalFunction(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 TgtTfloatFloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tgt_tfloat_float(temp, arg0); + 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::RegisterTgtTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgtTfloatFloatPhysicalFunction 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 TgtTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TgtTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TgtTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..ee97a6d45d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtTintIntPhysicalFunction.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 { + +TgtTintIntPhysicalFunction::TgtTintIntPhysicalFunction(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 TgtTintIntPhysicalFunction::execute(const Record& 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, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tgt_tint_int(temp, static_cast(arg0)); + 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::RegisterTgtTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TgtTintIntPhysicalFunction 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 TgtTintIntPhysicalFunction(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..4be767115e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TgtTtextTextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tgt_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/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/TleFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TleFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..596f2c854c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleFloatTfloatPhysicalFunction.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 { + +TleFloatTfloatPhysicalFunction::TleFloatTfloatPhysicalFunction(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 TleFloatTfloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tle_float_tfloat(arg0, 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::RegisterTleFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TleFloatTfloatPhysicalFunction 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 TleFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TleIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TleIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..ab3d2df6f2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleIntTintPhysicalFunction.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 { + +TleIntTintPhysicalFunction::TleIntTintPhysicalFunction(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 TleIntTintPhysicalFunction::execute(const Record& 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, + int32_t value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tle_int_tint(static_cast(arg0), 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::RegisterTleIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TleIntTintPhysicalFunction 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 TleIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TleTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TleTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..97c46deb10 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleTemporalTemporalPhysicalFunction.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 { + +TleTemporalTemporalPhysicalFunction::TleTemporalTemporalPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TleTemporalTemporalPhysicalFunction::execute(const Record& 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 = tle_temporal_temporal(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::RegisterTleTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TleTemporalTemporalPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TleTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..c3cc64caf9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleTextTtextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tle_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TleTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TleTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..5c5994c75e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleTfloatFloatPhysicalFunction.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 { + +TleTfloatFloatPhysicalFunction::TleTfloatFloatPhysicalFunction(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 TleTfloatFloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tle_tfloat_float(temp, arg0); + 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::RegisterTleTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TleTfloatFloatPhysicalFunction 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 TleTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TleTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TleTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..0e02cfd9ac --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleTintIntPhysicalFunction.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 { + +TleTintIntPhysicalFunction::TleTintIntPhysicalFunction(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 TleTintIntPhysicalFunction::execute(const Record& 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, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tle_tint_int(temp, static_cast(arg0)); + 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::RegisterTleTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TleTintIntPhysicalFunction 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 TleTintIntPhysicalFunction(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..33bb391dfb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TleTtextTextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tle_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TltFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TltFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..57cfc07e5f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltFloatTfloatPhysicalFunction.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 { + +TltFloatTfloatPhysicalFunction::TltFloatTfloatPhysicalFunction(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 TltFloatTfloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tlt_float_tfloat(arg0, 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::RegisterTltFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TltFloatTfloatPhysicalFunction 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 TltFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TltIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TltIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..c702f5e143 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltIntTintPhysicalFunction.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 { + +TltIntTintPhysicalFunction::TltIntTintPhysicalFunction(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 TltIntTintPhysicalFunction::execute(const Record& 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, + int32_t value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tlt_int_tint(static_cast(arg0), 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::RegisterTltIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TltIntTintPhysicalFunction 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 TltIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TltTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TltTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..76cf079b11 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltTemporalTemporalPhysicalFunction.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 { + +TltTemporalTemporalPhysicalFunction::TltTemporalTemporalPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TltTemporalTemporalPhysicalFunction::execute(const Record& 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 = tlt_temporal_temporal(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::RegisterTltTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TltTemporalTemporalPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TltTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..c3d83e7a35 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltTextTtextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tlt_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TltTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TltTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..420ba30f7a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltTfloatFloatPhysicalFunction.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 { + +TltTfloatFloatPhysicalFunction::TltTfloatFloatPhysicalFunction(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 TltTfloatFloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tlt_tfloat_float(temp, arg0); + 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::RegisterTltTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TltTfloatFloatPhysicalFunction 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 TltTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TltTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TltTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..542d804f38 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltTintIntPhysicalFunction.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 { + +TltTintIntPhysicalFunction::TltTintIntPhysicalFunction(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 TltTintIntPhysicalFunction::execute(const Record& 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, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tlt_tint_int(temp, static_cast(arg0)); + 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::RegisterTltTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TltTintIntPhysicalFunction 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 TltTintIntPhysicalFunction(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..ecb2966d22 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TltTtextTextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tlt_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/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/TneFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..2d4b285ecd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneFloatTfloatPhysicalFunction.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 { + +TneFloatTfloatPhysicalFunction::TneFloatTfloatPhysicalFunction(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 TneFloatTfloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tne_float_tfloat(arg0, 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::RegisterTneFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TneFloatTfloatPhysicalFunction 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 TneFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TneIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..b7519e692d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneIntTintPhysicalFunction.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 { + +TneIntTintPhysicalFunction::TneIntTintPhysicalFunction(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 TneIntTintPhysicalFunction::execute(const Record& 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, + int32_t value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tne_int_tint(static_cast(arg0), 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::RegisterTneIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TneIntTintPhysicalFunction 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 TneIntTintPhysicalFunction(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/TneTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..eeb50945e2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneTemporalTemporalPhysicalFunction.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 { + +TneTemporalTemporalPhysicalFunction::TneTemporalTemporalPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TneTemporalTemporalPhysicalFunction::execute(const Record& 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 = tne_temporal_temporal(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::RegisterTneTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TneTemporalTemporalPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TneTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // 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..df4913007f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneTextTtextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tne_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/TneTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..045340f782 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneTfloatFloatPhysicalFunction.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 { + +TneTfloatFloatPhysicalFunction::TneTfloatFloatPhysicalFunction(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 TneTfloatFloatPhysicalFunction::execute(const Record& 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, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tne_tfloat_float(temp, arg0); + 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::RegisterTneTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TneTfloatFloatPhysicalFunction 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 TneTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TneTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..90d2500e07 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneTintIntPhysicalFunction.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 { + +TneTintIntPhysicalFunction::TneTintIntPhysicalFunction(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 TneTintIntPhysicalFunction::execute(const Record& 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, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tne_tint_int(temp, static_cast(arg0)); + 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::RegisterTneTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TneTintIntPhysicalFunction 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 TneTintIntPhysicalFunction(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..8309f66480 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneTtextTextPhysicalFunction.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 +} + +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) -> bool { + 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 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(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return false; } + + Temporal* res = tne_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + 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/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/TnumberAbsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TnumberAbsPhysicalFunction.cpp new file mode 100644 index 0000000000..b7b0e81dc4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TnumberAbsPhysicalFunction.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 +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TnumberAbsPhysicalFunction::TnumberAbsPhysicalFunction(PhysicalFunction trajFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(trajFunction)); +} + +VarVal TnumberAbsPhysicalFunction::execute(const Record& 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; + + Temporal* res = tnumber_abs(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; + } + }, + traj.getContent(), traj.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTnumberAbsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "TnumberAbsPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return TnumberAbsPhysicalFunction(std::move(arg0)); +} + +} // 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/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-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); diff --git a/nes-sql-parser/AntlrSQL.g4 b/nes-sql-parser/AntlrSQL.g4 index 256726e087..55c1a67e12 100644 --- a/nes-sql-parser/AntlrSQL.g4 +++ b/nes-sql-parser/AntlrSQL.g4 @@ -295,7 +295,614 @@ 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: EDWITHIN_TGEO_GEO + | 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 + | ALWAYSEQTEMPORALTEMPORAL + | ALWAYSGETEMPORALTEMPORAL + | ALWAYSGTTEMPORALTEMPORAL + | ALWAYSLETEMPORALTEMPORAL + | ALWAYSLTTEMPORALTEMPORAL + | ALWAYSNETEMPORALTEMPORAL + | EVEREQTEMPORALTEMPORAL + | EVERGETEMPORALTEMPORAL + | EVERGTTEMPORALTEMPORAL + | EVERLETEMPORALTEMPORAL + | EVERLTTEMPORALTEMPORAL + | EVERNETEMPORALTEMPORAL + | ALWAYSEQTFLOATFLOAT + | ALWAYSGETFLOATFLOAT + | ALWAYSGTTFLOATFLOAT + | ALWAYSLETFLOATFLOAT + | ALWAYSLTTFLOATFLOAT + | ALWAYSNETFLOATFLOAT + | EVEREQTFLOATFLOAT + | EVERGETFLOATFLOAT + | EVERGTTFLOATFLOAT + | EVERLETFLOATFLOAT + | EVERLTTFLOATFLOAT + | EVERNETFLOATFLOAT + | ALWAYSEQTINTINT + | ALWAYSGETINTINT + | ALWAYSGTTINTINT + | ALWAYSLETINTINT + | ALWAYSLTTINTINT + | ALWAYSNETINTINT + | EVEREQTINTINT + | EVERGETINTINT + | EVERGTTINTINT + | EVERLETINTINT + | EVERLTTINTINT + | EVERNETINTINT + | ALWAYSEQFLOATTFLOAT + | ALWAYSGEFLOATTFLOAT + | ALWAYSGTFLOATTFLOAT + | ALWAYSLEFLOATTFLOAT + | ALWAYSLTFLOATTFLOAT + | ALWAYSNEFLOATTFLOAT + | EVEREQFLOATTFLOAT + | EVERGEFLOATTFLOAT + | EVERGTFLOATTFLOAT + | EVERLEFLOATTFLOAT + | EVERLTFLOATTFLOAT + | EVERNEFLOATTFLOAT + | ALWAYSEQINTTINT + | ALWAYSGEINTTINT + | ALWAYSGTINTTINT + | ALWAYSLEINTTINT + | ALWAYSLTINTTINT + | ALWAYSNEINTTINT + | EVEREQINTTINT + | EVERGEINTTINT + | EVERGTINTTINT + | EVERLEINTTINT + | EVERLTINTTINT + | EVERNEINTTINT + | TEMPORALAINTERSECTSGEOMETRY + | TEMPORALECONTAINSGEOMETRY + | TEMPORALINTERSECTSGEOMETRY + | TEMPORALEDWITHINGEOMETRY + | ALWAYSEQTCBUFFERCBUFFER + | ALWAYSNETCBUFFERCBUFFER + | EVEREQTCBUFFERCBUFFER + | EVERNETCBUFFERCBUFFER + | TEMPORAL_AT_STBOX + | ACONTAINS_TCBUFFER_CBUFFER + | ACOVERS_TCBUFFER_CBUFFER + | ADISJOINT_TCBUFFER_CBUFFER + | AINTERSECTS_TCBUFFER_CBUFFER + | ATOUCHES_TCBUFFER_CBUFFER + | ECONTAINS_TCBUFFER_CBUFFER + | ECOVERS_TCBUFFER_CBUFFER + | EDISJOINT_TCBUFFER_CBUFFER + | EINTERSECTS_TCBUFFER_CBUFFER + | ETOUCHES_TCBUFFER_CBUFFER + | NAD_TCBUFFER_CBUFFER + | ALWAYSEQ_TQUADBIN_TQUADBIN + | ALWAYSNE_TQUADBIN_TQUADBIN + | EVEREQ_TQUADBIN_TQUADBIN + | EVERNE_TQUADBIN_TQUADBIN + | ALWAYSEQ_QUADBIN_TQUADBIN + | ALWAYSNE_QUADBIN_TQUADBIN + | EVEREQ_QUADBIN_TQUADBIN + | EVERNE_QUADBIN_TQUADBIN + | ACOVERS_GEO_TGEO + | TFLOAT_COS + | TFLOAT_SIN + | TFLOAT_TAN + | TFLOAT_DEGREES + | TNUMBER_ABS + | TEQ_TFLOAT_FLOAT + | TEQ_FLOAT_TFLOAT + | TEQ_TINT_INT + | TEQ_INT_TINT + | TEQ_TEMPORAL_TEMPORAL + | TNE_TFLOAT_FLOAT + | TNE_FLOAT_TFLOAT + | TNE_TINT_INT + | TNE_INT_TINT + | TNE_TEMPORAL_TEMPORAL + | TLT_TFLOAT_FLOAT + | TLT_FLOAT_TFLOAT + | TLT_TINT_INT + | TLT_INT_TINT + | TLT_TEMPORAL_TEMPORAL + | TLE_TFLOAT_FLOAT + | TLE_FLOAT_TFLOAT + | TLE_TINT_INT + | TLE_INT_TINT + | TLE_TEMPORAL_TEMPORAL + | TGT_TFLOAT_FLOAT + | TGT_FLOAT_TFLOAT + | TGT_TINT_INT + | TGT_INT_TINT + | TGT_TEMPORAL_TEMPORAL + | TGE_TFLOAT_FLOAT + | TGE_FLOAT_TFLOAT + | TGE_TINT_INT + | TGE_INT_TINT + | TGE_TEMPORAL_TEMPORAL + | GEO_FROM_GEOJSON + | GEOM_FROM_HEXEWKB + | GEO_AS_HEXEWKB + | GEOM_MIN_BOUNDING_CENTER + | GEOM_MIN_BOUNDING_RADIUS + | GEO_TRANSFORM_PIPELINE + | GEOM_BUFFER + | GEOM_RELATE_PATTERN + | H3_GS_POINT_TO_CELL + | H3INDEX_IN + | EINTERSECTS_TPCPOINT_GEO + | NAD_TPCPOINT_GEO + | JSON_ARRAY_LENGTH + | JSON_TYPEOF + | JSON_ARRAY_ELEMENT_TEXT + | JSON_OBJECT_FIELD_TEXT + | FLOATSPAN_MAKE + | INTSPAN_MAKE; sinkClause: INTO sink (',' sink)*; @@ -488,6 +1095,615 @@ 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'; +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'; +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'; +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'; +TEMPORALAINTERSECTSGEOMETRY: 'TEMPORALAINTERSECTSGEOMETRY' | 'temporalaintersectsgeometry'; +TEMPORALECONTAINSGEOMETRY: 'TEMPORALECONTAINSGEOMETRY' | 'temporalecontainsgeometry'; +TEMPORALINTERSECTSGEOMETRY: 'TEMPORALINTERSECTSGEOMETRY' | 'temporalintersectsgeometry'; +TEMPORALEDWITHINGEOMETRY: 'TEMPORALEDWITHINGEOMETRY' | 'temporaledwithingeometry'; +ALWAYSEQTCBUFFERCBUFFER: 'ALWAYSEQTCBUFFERCBUFFER' | 'alwayseqtcbuffercbuffer'; +ALWAYSNETCBUFFERCBUFFER: 'ALWAYSNETCBUFFERCBUFFER' | 'alwaysnetcbuffercbuffer'; +EVEREQTCBUFFERCBUFFER: 'EVEREQTCBUFFERCBUFFER' | 'evereqtcbuffercbuffer'; +EVERNETCBUFFERCBUFFER: 'EVERNETCBUFFERCBUFFER' | 'evernetcbuffercbuffer'; +TEMPORAL_AT_STBOX: 'TEMPORAL_AT_STBOX' | 'temporal_at_stbox'; +ACONTAINS_TCBUFFER_CBUFFER: 'ACONTAINS_TCBUFFER_CBUFFER' | 'acontains_tcbuffer_cbuffer'; +ACOVERS_TCBUFFER_CBUFFER: 'ACOVERS_TCBUFFER_CBUFFER' | 'acovers_tcbuffer_cbuffer'; +ADISJOINT_TCBUFFER_CBUFFER: 'ADISJOINT_TCBUFFER_CBUFFER' | 'adisjoint_tcbuffer_cbuffer'; +AINTERSECTS_TCBUFFER_CBUFFER: 'AINTERSECTS_TCBUFFER_CBUFFER' | 'aintersects_tcbuffer_cbuffer'; +ATOUCHES_TCBUFFER_CBUFFER: 'ATOUCHES_TCBUFFER_CBUFFER' | 'atouches_tcbuffer_cbuffer'; +ECONTAINS_TCBUFFER_CBUFFER: 'ECONTAINS_TCBUFFER_CBUFFER' | 'econtains_tcbuffer_cbuffer'; +ECOVERS_TCBUFFER_CBUFFER: 'ECOVERS_TCBUFFER_CBUFFER' | 'ecovers_tcbuffer_cbuffer'; +EDISJOINT_TCBUFFER_CBUFFER: 'EDISJOINT_TCBUFFER_CBUFFER' | 'edisjoint_tcbuffer_cbuffer'; +EINTERSECTS_TCBUFFER_CBUFFER: 'EINTERSECTS_TCBUFFER_CBUFFER' | 'eintersects_tcbuffer_cbuffer'; +ETOUCHES_TCBUFFER_CBUFFER: 'ETOUCHES_TCBUFFER_CBUFFER' | 'etouches_tcbuffer_cbuffer'; +NAD_TCBUFFER_CBUFFER: 'NAD_TCBUFFER_CBUFFER' | 'nad_tcbuffer_cbuffer'; +ALWAYSEQ_TQUADBIN_TQUADBIN: 'ALWAYSEQ_TQUADBIN_TQUADBIN' | 'alwayseq_tquadbin_tquadbin'; +ALWAYSNE_TQUADBIN_TQUADBIN: 'ALWAYSNE_TQUADBIN_TQUADBIN' | 'alwaysne_tquadbin_tquadbin'; +EVEREQ_TQUADBIN_TQUADBIN: 'EVEREQ_TQUADBIN_TQUADBIN' | 'evereq_tquadbin_tquadbin'; +EVERNE_TQUADBIN_TQUADBIN: 'EVERNE_TQUADBIN_TQUADBIN' | 'everne_tquadbin_tquadbin'; +ALWAYSEQ_QUADBIN_TQUADBIN: 'ALWAYSEQ_QUADBIN_TQUADBIN' | 'alwayseq_quadbin_tquadbin'; +ALWAYSNE_QUADBIN_TQUADBIN: 'ALWAYSNE_QUADBIN_TQUADBIN' | 'alwaysne_quadbin_tquadbin'; +EVEREQ_QUADBIN_TQUADBIN: 'EVEREQ_QUADBIN_TQUADBIN' | 'evereq_quadbin_tquadbin'; +EVERNE_QUADBIN_TQUADBIN: 'EVERNE_QUADBIN_TQUADBIN' | 'everne_quadbin_tquadbin'; +ACOVERS_GEO_TGEO: 'ACOVERS_GEO_TGEO' | 'acovers_geo_tgeo'; +TFLOAT_COS: 'TFLOAT_COS' | 'tfloat_cos'; +TFLOAT_SIN: 'TFLOAT_SIN' | 'tfloat_sin'; +TFLOAT_TAN: 'TFLOAT_TAN' | 'tfloat_tan'; +TFLOAT_DEGREES: 'TFLOAT_DEGREES' | 'tfloat_degrees'; +TNUMBER_ABS: 'TNUMBER_ABS' | 'tnumber_abs'; +TEQ_TFLOAT_FLOAT: 'TEQ_TFLOAT_FLOAT' | 'teq_tfloat_float'; +TEQ_FLOAT_TFLOAT: 'TEQ_FLOAT_TFLOAT' | 'teq_float_tfloat'; +TEQ_TINT_INT: 'TEQ_TINT_INT' | 'teq_tint_int'; +TEQ_INT_TINT: 'TEQ_INT_TINT' | 'teq_int_tint'; +TEQ_TEMPORAL_TEMPORAL: 'TEQ_TEMPORAL_TEMPORAL' | 'teq_temporal_temporal'; +TNE_TFLOAT_FLOAT: 'TNE_TFLOAT_FLOAT' | 'tne_tfloat_float'; +TNE_FLOAT_TFLOAT: 'TNE_FLOAT_TFLOAT' | 'tne_float_tfloat'; +TNE_TINT_INT: 'TNE_TINT_INT' | 'tne_tint_int'; +TNE_INT_TINT: 'TNE_INT_TINT' | 'tne_int_tint'; +TNE_TEMPORAL_TEMPORAL: 'TNE_TEMPORAL_TEMPORAL' | 'tne_temporal_temporal'; +TLT_TFLOAT_FLOAT: 'TLT_TFLOAT_FLOAT' | 'tlt_tfloat_float'; +TLT_FLOAT_TFLOAT: 'TLT_FLOAT_TFLOAT' | 'tlt_float_tfloat'; +TLT_TINT_INT: 'TLT_TINT_INT' | 'tlt_tint_int'; +TLT_INT_TINT: 'TLT_INT_TINT' | 'tlt_int_tint'; +TLT_TEMPORAL_TEMPORAL: 'TLT_TEMPORAL_TEMPORAL' | 'tlt_temporal_temporal'; +TLE_TFLOAT_FLOAT: 'TLE_TFLOAT_FLOAT' | 'tle_tfloat_float'; +TLE_FLOAT_TFLOAT: 'TLE_FLOAT_TFLOAT' | 'tle_float_tfloat'; +TLE_TINT_INT: 'TLE_TINT_INT' | 'tle_tint_int'; +TLE_INT_TINT: 'TLE_INT_TINT' | 'tle_int_tint'; +TLE_TEMPORAL_TEMPORAL: 'TLE_TEMPORAL_TEMPORAL' | 'tle_temporal_temporal'; +TGT_TFLOAT_FLOAT: 'TGT_TFLOAT_FLOAT' | 'tgt_tfloat_float'; +TGT_FLOAT_TFLOAT: 'TGT_FLOAT_TFLOAT' | 'tgt_float_tfloat'; +TGT_TINT_INT: 'TGT_TINT_INT' | 'tgt_tint_int'; +TGT_INT_TINT: 'TGT_INT_TINT' | 'tgt_int_tint'; +TGT_TEMPORAL_TEMPORAL: 'TGT_TEMPORAL_TEMPORAL' | 'tgt_temporal_temporal'; +TGE_TFLOAT_FLOAT: 'TGE_TFLOAT_FLOAT' | 'tge_tfloat_float'; +TGE_FLOAT_TFLOAT: 'TGE_FLOAT_TFLOAT' | 'tge_float_tfloat'; +TGE_TINT_INT: 'TGE_TINT_INT' | 'tge_tint_int'; +TGE_INT_TINT: 'TGE_INT_TINT' | 'tge_int_tint'; +TGE_TEMPORAL_TEMPORAL: 'TGE_TEMPORAL_TEMPORAL' | 'tge_temporal_temporal'; +GEO_FROM_GEOJSON: 'GEO_FROM_GEOJSON' | 'geo_from_geojson'; +GEOM_FROM_HEXEWKB: 'GEOM_FROM_HEXEWKB' | 'geom_from_hexewkb'; +GEO_AS_HEXEWKB: 'GEO_AS_HEXEWKB' | 'geo_as_hexewkb'; +GEOM_MIN_BOUNDING_CENTER: 'GEOM_MIN_BOUNDING_CENTER' | 'geom_min_bounding_center'; +GEOM_MIN_BOUNDING_RADIUS: 'GEOM_MIN_BOUNDING_RADIUS' | 'geom_min_bounding_radius'; +GEO_TRANSFORM_PIPELINE: 'GEO_TRANSFORM_PIPELINE' | 'geo_transform_pipeline'; +GEOM_BUFFER: 'GEOM_BUFFER' | 'geom_buffer'; +GEOM_RELATE_PATTERN: 'GEOM_RELATE_PATTERN' | 'geom_relate_pattern'; +H3_GS_POINT_TO_CELL: 'H3_GS_POINT_TO_CELL' | 'h3_gs_point_to_cell'; +H3INDEX_IN: 'H3INDEX_IN' | 'h3index_in'; +EINTERSECTS_TPCPOINT_GEO: 'EINTERSECTS_TPCPOINT_GEO' | 'eintersects_tpcpoint_geo'; +NAD_TPCPOINT_GEO: 'NAD_TPCPOINT_GEO' | 'nad_tpcpoint_geo'; +JSON_ARRAY_LENGTH: 'JSON_ARRAY_LENGTH' | 'json_array_length'; +JSON_TYPEOF: 'JSON_TYPEOF' | 'json_typeof'; +JSON_ARRAY_ELEMENT_TEXT: 'JSON_ARRAY_ELEMENT_TEXT' | 'json_array_element_text'; +JSON_OBJECT_FIELD_TEXT: 'JSON_OBJECT_FIELD_TEXT' | 'json_object_field_text'; +FLOATSPAN_MAKE: 'FLOATSPAN_MAKE' | 'floatspan_make'; +INTSPAN_MAKE: 'INTSPAN_MAKE' | 'intspan_make'; +/* 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..4b23cf1be7 100644 --- a/nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp +++ b/nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp @@ -69,6 +69,856 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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 +2038,17564 @@ 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: ACONTAINS_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ACONTAINS_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ACONTAINS_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( + AcontainsTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ACOVERS_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ACOVERS_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ACOVERS_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( + AcoversTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ACOVERS_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ADISJOINT_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ADISJOINT_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ADISJOINT_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( + AdisjointTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ADISJOINT_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: AINTERSECTS_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::AINTERSECTS_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("AINTERSECTS_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( + AintersectsTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: AINTERSECTS_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ATOUCHES_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ATOUCHES_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ATOUCHES_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( + AtouchesTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ATOUCHES_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ECONTAINS_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ECONTAINS_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( + EcontainsTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ECOVERS_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ECOVERS_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ECOVERS_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( + EcoversTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECOVERS_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::EDISJOINT_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EDISJOINT_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( + EdisjointTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EINTERSECTS_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::EINTERSECTS_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EINTERSECTS_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( + EintersectsTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EINTERSECTS_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ETOUCHES_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ETOUCHES_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ETOUCHES_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( + EtouchesTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ETOUCHES_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::NAD_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("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( + NadTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQ_TQUADBIN_TQUADBIN */ + case AntlrSQLLexer::ALWAYSEQ_TQUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ALWAYSEQ_TQUADBIN_TQUADBIN 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(AlwaysEqTquadbinTquadbinLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQ_TQUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNE_TQUADBIN_TQUADBIN */ + case AntlrSQLLexer::ALWAYSNE_TQUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ALWAYSNE_TQUADBIN_TQUADBIN 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(AlwaysNeTquadbinTquadbinLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNE_TQUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQ_TQUADBIN_TQUADBIN */ + case AntlrSQLLexer::EVEREQ_TQUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EVEREQ_TQUADBIN_TQUADBIN 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(EverEqTquadbinTquadbinLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQ_TQUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNE_TQUADBIN_TQUADBIN */ + case AntlrSQLLexer::EVERNE_TQUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EVERNE_TQUADBIN_TQUADBIN 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(EverNeTquadbinTquadbinLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNE_TQUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQ_QUADBIN_TQUADBIN */ + case AntlrSQLLexer::ALWAYSEQ_QUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQ_QUADBIN_TQUADBIN 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(AlwaysEqQuadbinTquadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQ_QUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNE_QUADBIN_TQUADBIN */ + case AntlrSQLLexer::ALWAYSNE_QUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNE_QUADBIN_TQUADBIN 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(AlwaysNeQuadbinTquadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNE_QUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQ_QUADBIN_TQUADBIN */ + case AntlrSQLLexer::EVEREQ_QUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQ_QUADBIN_TQUADBIN 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(EverEqQuadbinTquadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQ_QUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNE_QUADBIN_TQUADBIN */ + case AntlrSQLLexer::EVERNE_QUADBIN_TQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNE_QUADBIN_TQUADBIN 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(EverNeQuadbinTquadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNE_QUADBIN_TQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: ACOVERS_GEO_TGEO */ + case AntlrSQLLexer::ACOVERS_GEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("ACOVERS_GEO_TGEO 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(AcoversGeoTgeoLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: ACOVERS_GEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_COS */ + case AntlrSQLLexer::TFLOAT_COS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_COS 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(TfloatCosLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_COS */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_SIN */ + case AntlrSQLLexer::TFLOAT_SIN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_SIN 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(TfloatSinLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_SIN */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_TAN */ + case AntlrSQLLexer::TFLOAT_TAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_TAN 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(TfloatTanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_TAN */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_DEGREES */ + case AntlrSQLLexer::TFLOAT_DEGREES: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TFLOAT_DEGREES 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(TfloatDegreesLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_DEGREES */ + + /* BEGIN CODEGEN PARSER GLUE: TNUMBER_ABS */ + case AntlrSQLLexer::TNUMBER_ABS: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("TNUMBER_ABS 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(TnumberAbsLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: TNUMBER_ABS */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_TFLOAT_FLOAT */ + case AntlrSQLLexer::TEQ_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_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(TeqTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_FLOAT_TFLOAT */ + case AntlrSQLLexer::TEQ_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_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(TeqFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_TINT_INT */ + case AntlrSQLLexer::TEQ_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_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(TeqTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_INT_TINT */ + case AntlrSQLLexer::TEQ_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_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(TeqIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_TEMPORAL_TEMPORAL */ + case AntlrSQLLexer::TEQ_TEMPORAL_TEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TEQ_TEMPORAL_TEMPORAL 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(TeqTemporalTemporalLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_TEMPORAL_TEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_TFLOAT_FLOAT */ + case AntlrSQLLexer::TNE_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_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(TneTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_FLOAT_TFLOAT */ + case AntlrSQLLexer::TNE_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_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(TneFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_TINT_INT */ + case AntlrSQLLexer::TNE_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_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(TneTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_INT_TINT */ + case AntlrSQLLexer::TNE_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_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(TneIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_TEMPORAL_TEMPORAL */ + case AntlrSQLLexer::TNE_TEMPORAL_TEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TNE_TEMPORAL_TEMPORAL 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(TneTemporalTemporalLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_TEMPORAL_TEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_TFLOAT_FLOAT */ + case AntlrSQLLexer::TLT_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLT_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(TltTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_FLOAT_TFLOAT */ + case AntlrSQLLexer::TLT_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLT_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(TltFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_TINT_INT */ + case AntlrSQLLexer::TLT_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLT_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(TltTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_INT_TINT */ + case AntlrSQLLexer::TLT_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLT_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(TltIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_TEMPORAL_TEMPORAL */ + case AntlrSQLLexer::TLT_TEMPORAL_TEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TLT_TEMPORAL_TEMPORAL 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(TltTemporalTemporalLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_TEMPORAL_TEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_TFLOAT_FLOAT */ + case AntlrSQLLexer::TLE_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLE_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(TleTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_FLOAT_TFLOAT */ + case AntlrSQLLexer::TLE_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLE_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(TleFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_TINT_INT */ + case AntlrSQLLexer::TLE_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLE_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(TleTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_INT_TINT */ + case AntlrSQLLexer::TLE_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLE_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(TleIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_TEMPORAL_TEMPORAL */ + case AntlrSQLLexer::TLE_TEMPORAL_TEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TLE_TEMPORAL_TEMPORAL 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(TleTemporalTemporalLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_TEMPORAL_TEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_TFLOAT_FLOAT */ + case AntlrSQLLexer::TGT_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGT_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(TgtTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_FLOAT_TFLOAT */ + case AntlrSQLLexer::TGT_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGT_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(TgtFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_TINT_INT */ + case AntlrSQLLexer::TGT_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGT_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(TgtTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_INT_TINT */ + case AntlrSQLLexer::TGT_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGT_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(TgtIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_TEMPORAL_TEMPORAL */ + case AntlrSQLLexer::TGT_TEMPORAL_TEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TGT_TEMPORAL_TEMPORAL 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(TgtTemporalTemporalLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_TEMPORAL_TEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_TFLOAT_FLOAT */ + case AntlrSQLLexer::TGE_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGE_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(TgeTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_FLOAT_TFLOAT */ + case AntlrSQLLexer::TGE_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGE_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(TgeFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_TINT_INT */ + case AntlrSQLLexer::TGE_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGE_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(TgeTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_INT_TINT */ + case AntlrSQLLexer::TGE_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGE_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(TgeIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_TEMPORAL_TEMPORAL */ + case AntlrSQLLexer::TGE_TEMPORAL_TEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TGE_TEMPORAL_TEMPORAL 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(TgeTemporalTemporalLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_TEMPORAL_TEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_FROM_GEOJSON */ + case AntlrSQLLexer::GEO_FROM_GEOJSON: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEO_FROM_GEOJSON 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(GeoFromGeojsonLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_FROM_GEOJSON */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_FROM_HEXEWKB */ + case AntlrSQLLexer::GEOM_FROM_HEXEWKB: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOM_FROM_HEXEWKB 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(GeomFromHexewkbLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_FROM_HEXEWKB */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_AS_HEXEWKB */ + case AntlrSQLLexer::GEO_AS_HEXEWKB: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEO_AS_HEXEWKB 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(GeoAsHexewkbLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_AS_HEXEWKB */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_MIN_BOUNDING_CENTER */ + case AntlrSQLLexer::GEOM_MIN_BOUNDING_CENTER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOM_MIN_BOUNDING_CENTER 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(GeomMinBoundingCenterLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_MIN_BOUNDING_CENTER */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_MIN_BOUNDING_RADIUS */ + case AntlrSQLLexer::GEOM_MIN_BOUNDING_RADIUS: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOM_MIN_BOUNDING_RADIUS 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(GeomMinBoundingRadiusLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_MIN_BOUNDING_RADIUS */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_TRANSFORM_PIPELINE */ + case AntlrSQLLexer::GEO_TRANSFORM_PIPELINE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("GEO_TRANSFORM_PIPELINE 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(GeoTransformPipelineLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_TRANSFORM_PIPELINE */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_BUFFER */ + case AntlrSQLLexer::GEOM_BUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOM_BUFFER 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(GeomBufferLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_BUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_RELATE_PATTERN */ + case AntlrSQLLexer::GEOM_RELATE_PATTERN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOM_RELATE_PATTERN 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(GeomRelatePatternLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_RELATE_PATTERN */ + + /* BEGIN CODEGEN PARSER GLUE: H3_GS_POINT_TO_CELL */ + case AntlrSQLLexer::H3_GS_POINT_TO_CELL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("H3_GS_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(H3GsPointToCellLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: H3_GS_POINT_TO_CELL */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_IN */ + case AntlrSQLLexer::H3INDEX_IN: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("H3INDEX_IN 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(H3indexInLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_IN */ + + /* BEGIN CODEGEN PARSER GLUE: EINTERSECTS_TPCPOINT_GEO */ + case AntlrSQLLexer::EINTERSECTS_TPCPOINT_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EINTERSECTS_TPCPOINT_GEO 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(EintersectsTpcpointGeoLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EINTERSECTS_TPCPOINT_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TPCPOINT_GEO */ + case AntlrSQLLexer::NAD_TPCPOINT_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("NAD_TPCPOINT_GEO 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(NadTpcpointGeoLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TPCPOINT_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: JSON_ARRAY_LENGTH */ + case AntlrSQLLexer::JSON_ARRAY_LENGTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("JSON_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(JsonArrayLengthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: JSON_ARRAY_LENGTH */ + + /* BEGIN CODEGEN PARSER GLUE: JSON_TYPEOF */ + case AntlrSQLLexer::JSON_TYPEOF: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("JSON_TYPEOF 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(JsonTypeofLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: JSON_TYPEOF */ + + /* BEGIN CODEGEN PARSER GLUE: JSON_ARRAY_ELEMENT_TEXT */ + case AntlrSQLLexer::JSON_ARRAY_ELEMENT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSON_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(JsonArrayElementTextLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSON_ARRAY_ELEMENT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: JSON_OBJECT_FIELD_TEXT */ + case AntlrSQLLexer::JSON_OBJECT_FIELD_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSON_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(JsonObjectFieldTextLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSON_OBJECT_FIELD_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: FLOATSPAN_MAKE */ + case AntlrSQLLexer::FLOATSPAN_MAKE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("FLOATSPAN_MAKE 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(FloatspanMakeLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: FLOATSPAN_MAKE */ + + /* BEGIN CODEGEN PARSER GLUE: INTSPAN_MAKE */ + case AntlrSQLLexer::INTSPAN_MAKE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("INTSPAN_MAKE 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(IntspanMakeLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: INTSPAN_MAKE */ + + + default: /// Check if the function is a constructor for a datatype if (const auto dataType = DataTypeProvider::tryProvideDataType(funcName); dataType.has_value()) 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/README.md b/tools/codegen/README.md new file mode 100644 index 0000000000..760fa6f8ca --- /dev/null +++ b/tools/codegen/README.md @@ -0,0 +1,87 @@ +# MobilityNebula MEOS per-event operator codegen + +This directory contains the IDL-driven code generator for the canonical +615-op per-event MEOS surface in MobilityNebula. + +## What it is + +The generator reads JSON descriptor files that describe each MEOS operator +(name, SQL token, MEOS C function, argument types, return type) and emits +the four C++ files that NES requires per operator: + +- `nes-logical-operators/include/Functions/Meos/LogicalFunction.hpp` +- `nes-logical-operators/src/Functions/Meos/LogicalFunction.cpp` +- `nes-physical-operators/include/Functions/Meos/PhysicalFunction.hpp` +- `nes-physical-operators/src/Functions/Meos/PhysicalFunction.cpp` + +In addition to the per-operator files, the generator injects the +CMakeLists.txt target lists, the AntlrSQL.g4 token rules, and the +AntlrSQLQueryPlanCreator.cpp dispatch table so the full NES build stays +consistent with the committed surface. + +## Pipeline + +``` +MobilityDB master + └─► MEOS-API run.py # libclang extracts the C API + └─► meos-idl-master.json # IDL: all public MEOS functions + └─► build_descriptor.py # author a JSON descriptor family + └─► *-descriptor.json # per-family operator list + └─► gen_all.py # orchestrates all 9 families + └─► 4 C++ files per op + CMake/grammar/QPC glue +``` + +`meos-idl-master.json` committed here is a snapshot of the IDL generated +from the current MobilityDB master. Regenerate it via MEOS-API when the +upstream C surface changes. + +## Descriptor families (9 total, 615 operators) + +| Descriptor file | Family | +|-----------------------------------------|---------------------------------------------| +| `tfloat-transforms-descriptor.json` | tfloat trig / abs / shift-scale | +| `numeric-descriptor.json` | tint/tfloat/tbigint arithmetic, comparisons | +| `spatial-predicates-descriptor.json` | tgeo/tcbuffer/tnpoint/tpose spatial preds | +| `spatial-phasec-full-descriptor.json` | full phase-C tgeo/tcbuffer/trgeometry preds | +| `phasec-rest-descriptor.json` | remaining phase-C spatial ops | +| `trgeo-descriptor.json` | trgeometry spatial predicates | +| `phasec-composed-descriptor.json` | composed / multi-step spatial ops | +| `missing-ops-descriptor.json` | 69 canonical ops not covered above | +| `canonical-new-ops-descriptor.json` | 85 gap-fill ops closing the TARGET_SURFACE | + +Intentionally excluded: bbox/topological operators (stbox/stbox, +stbox/tspatial, tbox/tnumber families) and non-canonical per-type numeric +two-temporal comparisons are out of scope for the 615-op canonical surface. + +## How to regenerate after a MobilityDB API change + +```sh +python tools/codegen/gen_all.py --output-root +``` + +`` must be the MobilityNebula repository root (the directory +that contains `nes-logical-operators/`). The script writes all 2 460 C++ +files and updates CMakeLists.txt, AntlrSQL.g4, and +AntlrSQLQueryPlanCreator.cpp in place. Commit the result. + +## Files in this directory + +| File | Purpose | +|-------------------------------|---------------------------------------------------| +| `codegen_nebula.py` | Core emitter: templates for all 4 C++ file kinds | +| `gen_all.py` | Orchestrator: runs all 9 descriptor families | +| `codegen_aggregations.py` | Supplementary generator for aggregation operators | +| `build_descriptor.py` | Helper: build a new descriptor from IDL entries | +| `codegen_input.example.json` | Annotated example descriptor for new families | +| `meos-idl-master.json` | Committed IDL snapshot from MobilityDB master | +| `build_local.sh` | Local convenience wrapper for gen_all.py | +| `*-descriptor.json` | The 9 operator family descriptors | + +## Drift guard + +`.github/workflows/codegen-drift-guard.yml` (added in the follow-up PR) +runs on every pull request. It executes `gen_all.py --output-root .` and +then asserts `git diff --quiet`. Any divergence between the committed +operator files and the generator output fails the check and prints the +diff stat. To fix a drift failure, run the regeneration command above and +commit the updated files. diff --git a/tools/codegen/build_descriptor.py b/tools/codegen/build_descriptor.py new file mode 100644 index 0000000000..4d144bb682 --- /dev/null +++ b/tools/codegen/build_descriptor.py @@ -0,0 +1,705 @@ +#!/usr/bin/env python3 +"""Build a codegen_nebula.py descriptor from classified MEOS gap functions. + +Reads a header-signature dump (one `extern ();` per line, as +produced from the in-container /usr/local/include/meos*.h) plus a gap list +(streamable functions not yet wired by a Nebula operator), classifies each +function into a known operator SHAPE, and emits the JSON descriptor that +codegen_nebula.py consumes. + +A SHAPE knows: the per-event SQL arg list, the `build_*` flag selecting the +physical-cpp template, the MEOS return marshaling, and the per-base-type input +ctor (tfloat_in / tint_in / ...). Adding a family = adding a classifier here; +the C++ templates live in codegen_nebula.py. + +This keeps the bulk-emission measured-not-guessed: only functions whose exact +in-header signature matches a SHAPE are emitted, and only if they are in the +gap. Functions that don't match any SHAPE are reported, never silently dropped. + +Usage: + build_descriptor.py --sigs /tmp/cmp_sigs.txt --gap /tmp/nebula_gap.txt \\ + --shapes cmp_scalar_tempfirst --out wave22.json +""" +import argparse +import json +import re +import sys + +# --- per-base-type input construction ------------------------------------- +# token in the meos-call name -> (tnumber_in_fn, cpp value type, wkt format) +BASE = { + "tfloat": ("tfloat_in", "double", "{}@{}"), + "tint": ("tint_in", "int", "{}@{}"), +} +SCALAR_CPP = {"double": "double", "int": "int"} + + +def pascal(meos_call): + return "".join(p.capitalize() for p in meos_call.split("_")) + + +def parse_sigs(path): + """name -> (ret, [normalized-arg-type, ...]).""" + out = {} + for ln in open(path): + m = re.match(r"extern\s+([\w ]+?)\s*(\*?)\s*(\w+)\(([^)]*)\);", ln.strip()) + if not m: + continue + ret = (m.group(1) + m.group(2)).strip() + name = m.group(3) + args = [] + for a in m.group(4).split(","): + a = a.strip() + if not a or a == "void": + continue + base = re.sub(r"^const\s+", "", a) + ty = base.split()[0] + ("*" if "*" in a else "") + args.append(ty) + out[name] = (ret, tuple(args)) + return out + + +# --- SHAPE classifiers ------------------------------------------------------ +# Each returns a descriptor dict for `fn` if it matches, else None. + +def cmp_scalar_tempfirst(fn, ret, args): + """ever/always comparison: int fn(const Temporal*, double|int), temp first. + Reuses build_tnumber_point_with_scalar (already in codegen_nebula.py).""" + if ret != "int" or args not in (("Temporal*", "double"), ("Temporal*", "int")): + return None + base = "tfloat" if args[1] == "double" else "tint" + in_fn, vcpp, wkt = BASE[base] + name = pascal(fn) + # CPP ctor continuation aligns 'P' of PhysicalFunction with the first arg: + # 'NamePhysicalFunction::NamePhysicalFunction(' has len L, cont = L+1. + cpp_ctor_prefix = f"{name}PhysicalFunction::{name}PhysicalFunction(" + ctor_sep_indent = len(cpp_ctor_prefix) + 1 + return { + "nebula_name": name, + "sql_token": fn.upper(), + "meos_call": fn, + "args": [ + {"name": "value", "nautilus_type": vcpp, "cpp_type": vcpp}, + {"name": "threshold", "nautilus_type": vcpp, "cpp_type": vcpp}, + {"name": "ts", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnumber_point_with_scalar": True, + "tnumber_value_cpp_type": vcpp, + "scalar_cpp_type": SCALAR_CPP[vcpp], + "tnumber_wkt_format": wkt, + "tnumber_in_fn": in_fn, + "ctor_sep_indent": ctor_sep_indent, + # tint lambda args are typed double; cast to int for fmt and MEOS call. + **({"value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)"} if base == "tint" else {}), + "comment_one_liner": ( + f"Per-event {fn.split('_')[0]} comparison of a single-instant {base} " + f"(built from value+timestamp) against a scalar constant."), + } + + +def cmp_scalar_scalarfirst(fn, ret, args): + """ever/always comparison: int fn(double|int, const Temporal*), scalar first. + Reuses build_tnumber_scalar_first (MEOS call passes scalar as 1st arg).""" + if ret != "int" or args not in (("double", "Temporal*"), ("int", "Temporal*")): + return None + base = "tfloat" if args[0] == "double" else "tint" + in_fn, vcpp, wkt = BASE[base] + return { + "nebula_name": pascal(fn), + "sql_token": fn.upper(), + "meos_call": fn, + "args": [ + {"name": "scalar", "nautilus_type": vcpp, "cpp_type": vcpp}, + {"name": "value", "nautilus_type": vcpp, "cpp_type": vcpp}, + {"name": "ts", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnumber_scalar_first": True, + "tnumber_value_cpp_type": vcpp, + "scalar_cpp_type": SCALAR_CPP[vcpp], + "tnumber_wkt_format": wkt, + "tnumber_in_fn": in_fn, + # CPP ctor continuation indent is fixed per base type (matches committed W2-W145 style). + "ctor_sep_indent": 70 if base == "tfloat" else 61, + # Lambda params are named (d, v); value_fmt_expr uses those names. + # For tint: cast to int for fmt and MEOS call; for tfloat: use bare lambda param names. + "value_fmt_expr": "static_cast(v)" if base == "tint" else "v", + "scalar_call_expr": "static_cast(d)" if base == "tint" else "d", + "comment_one_liner": ( + f"Per-event {fn.split('_')[0]} comparison of a scalar constant against a " + f"single-instant {base} (built from value+timestamp); scalar-first MEOS arg order."), + } + + +def cmp_two_temporal(fn, ret, args): + """Generic two-temporal comparison: int fn(const Temporal*, const Temporal*) + on the *_temporal_temporal functions. Builds two single-instant tfloats from + (value1,value2,ts) — both instants share the same timestamp — and reuses + build_two_tnumber_points.""" + if ret != "int" or args != ("Temporal*", "Temporal*") or not fn.endswith("_temporal_temporal"): + return None + in_fn, vcpp, wkt = BASE["tfloat"] + return { + "nebula_name": pascal(fn), + "sql_token": fn.upper(), + "meos_call": fn, + "args": [ + {"name": "value1", "nautilus_type": vcpp, "cpp_type": vcpp}, + {"name": "value2", "nautilus_type": vcpp, "cpp_type": vcpp}, + {"name": "ts", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnumber_points": True, + "tnumber_value_cpp_type": vcpp, + "tnumber_wkt_format": wkt, + "tnumber_in_fn": in_fn, + # CPP ctor continuation indent is fixed at 80 for all two-temporal tfloat ops + # (matches committed W2-W145 style). + "ctor_sep_indent": 80, + "comment_one_liner": ( + f"Per-event {fn.split('_')[0]} comparison between two single-instant " + f"temporals (built from value1/value2 at a shared timestamp ts)."), + } + + +def _args(spec): + return [{"name": n, "nautilus_type": t, + "cpp_type": "const char*" if t == "VariableSizedData" else t} for n, t in spec] + + +# per-template SQL arg layouts (must match the physical-cpp template's parameterValues order) +_A_TGEO_GEO = [("lon", "double"), ("lat", "double"), ("timestamp", "uint64_t"), ("geometry", "VariableSizedData")] +_A_TWO_TGEO = [("lonA", "double"), ("latA", "double"), ("tsA", "uint64_t"), + ("lonB", "double"), ("latB", "double"), ("tsB", "uint64_t")] +_A_TCB_CB = [("lon", "double"), ("lat", "double"), ("radius", "double"), ("timestamp", "uint64_t"), ("cbuffer", "VariableSizedData")] +_A_TWO_TCB = [("lonA", "double"), ("latA", "double"), ("radiusA", "double"), ("tsA", "uint64_t"), + ("lonB", "double"), ("latB", "double"), ("radiusB", "double"), ("tsB", "uint64_t")] + + +_SCALAR_RET = {"int": ("int", "INT32"), "double": ("double", "FLOAT64"), "bool": ("bool", "BOOLEAN")} + + +def _mk_scalar(fn, flag, argspec, note, ret="int"): + rt, nr = _SCALAR_RET[ret] + return { + "nebula_name": pascal(fn), + "sql_token": fn.upper(), + "meos_call": fn, + "args": _args(argspec), + "return_type": rt, + "nautilus_return": nr, + flag: True, + "comment_one_liner": note, + } + + +def sprel_scalar_existing(fn, ret, args): + """Scalar-returning (int/double/bool) spatial-relation / comparison / topological / + distance whose per-event input build is already covered by an existing + physical-cpp template. Routes by arg-shape + type token; returns None for + shapes needing a new template (tnpoint/tpose native two-temporal, reversed-arg, + text/bool object args, non-scalar return).""" + if ret not in _SCALAR_RET: + return None + if args == ("Temporal*", "GSERIALIZED*") and ("_tgeo_" in fn or "_tpoint_" in fn or "_tspatial_" in fn): + return _mk_scalar(fn, "build_temporal_point", _A_TGEO_GEO, + f"Per-event {fn}: single-instant tgeompoint vs a static geometry -> {ret}.", ret) + if args == ("Temporal*", "Temporal*") and "tcbuffer" in fn: + return _mk_scalar(fn, "build_two_tcbuffer_points", _A_TWO_TCB, + f"Per-event {fn} between two single-instant tcbuffers -> {ret}.", ret) + if args == ("Temporal*", "Temporal*") and not ("tnpoint" in fn or "tpose" in fn or "tnumber" in fn): + return _mk_scalar(fn, "build_two_temporal_points", _A_TWO_TGEO, + f"Per-event {fn} between two single-instant tgeompoints -> {ret}.", ret) + if args == ("Temporal*", "Cbuffer*"): + return _mk_scalar(fn, "build_tcbuffer_point_cbuffer", _A_TCB_CB, + f"Per-event {fn}: single-instant tcbuffer vs a static cbuffer -> {ret}.", ret) + return None + + +# leading/embedded type token -> generic input-builder key (codegen_nebula GENERIC_INPUTS) +_GENERIC_INPUT_FOR = [ + ("tgeompoint", "tgeompoint"), ("tgeogpoint", "tgeompoint"), ("tgeometry", "tgeometry"), + ("tcbuffer", "tcbuffer"), ("tnpoint", "tnpoint"), ("tpose", "tpose"), + ("tfloat", "tfloat"), ("tint", "tint"), ("tbool", "tbool"), + ("tnumber", "tfloat"), ("tgeo", "tgeompoint"), ("tpoint", "tgeompoint"), + ("tspatial", "tgeompoint"), +] + + +def _infer_input(fn): + for tok, inp in _GENERIC_INPUT_FOR: + if fn.startswith(tok + "_") or ("_" + tok + "_") in fn or fn.endswith("_" + tok): + return inp + return None + + +def temporal_unary_scalar(fn, ret, args): + """Unary scalar accessor: int|double|bool fn(const Temporal*). Generic shape; + input type inferred from the name token.""" + if args != ("Temporal*",): + return None + rk = {"int": "int", "double": "double", "bool": "bool"}.get(ret) + if not rk: + return None + inp = _infer_input(fn) + if not inp: + return None + return { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": inp, "extra_args": [], "return_kind": rk, + "comment_one_liner": f"Per-event {fn}: {rk} accessor over a single-instant {inp}.", + } + + +_SCALAR_CPP = {"double": "double", "int": "int32_t", "bool": "bool"} + + +def temporal_x_scalar(fn, ret, args): + """int|double|bool fn(const Temporal*, scalar). Generic shape, one scalar extra.""" + if len(args) != 2 or args[0] != "Temporal*" or args[1] not in _SCALAR_CPP: + return None + rk = {"int": "int", "double": "double", "bool": "bool"}.get(ret) + inp = _infer_input(fn) + if not rk or not inp: + return None + return { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": inp, + "extra_args": [{"kind": "scalar", "cpp": _SCALAR_CPP[args[1]]}], "return_kind": rk, + "comment_one_liner": f"Per-event {fn}: single-instant {inp} against a scalar -> {rk}.", + } + + +def temporal_x_geom(fn, ret, args): + """int|double|bool fn(const Temporal*, const GSERIALIZED*). Generic shape, one geom extra.""" + if args != ("Temporal*", "GSERIALIZED*"): + return None + rk = {"int": "int", "double": "double", "bool": "bool"}.get(ret) + inp = _infer_input(fn) + if not rk or not inp: + return None + return { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": inp, + "extra_args": [{"kind": "geom"}], "return_kind": rk, + "comment_one_liner": f"Per-event {fn}: single-instant {inp} against a static geometry -> {rk}.", + } + + +def _result_extract_kind(fn): + """Scalar return_kind for a Temporal*-returning transform whose single-instant + result carries a tint/tfloat/tbool value — inferred from the function name.""" + if "_to_tint" in fn: + return "extract_int" + if "_to_tfloat" in fn: + return "extract_double" + if "_to_tbool" in fn: + return "extract_bool" + if fn.startswith("tfloat_"): + return "extract_double" + if fn.startswith("tint_"): + return "extract_int" + if fn.startswith("tbool_"): + return "extract_bool" + return None + + +def temporal_extract_scalar(fn, ret, args): + """Unary Temporal->Temporal* transform whose single-instant result carries a + scalar value (tfloat_ceil, tbool_to_tint, ...). Generic shape with an extract + marshaler. Result/text/geo-returning transforms are deferred (varsize).""" + if ret != "Temporal*" or args != ("Temporal*",): + return None + inp = _infer_input(fn) + rk = _result_extract_kind(fn) + if not inp or not rk: + return None + return { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": inp, "extra_args": [], "return_kind": rk, + "comment_one_liner": f"Per-event {fn}: single-instant {inp} transform, value extracted -> {rk[8:]}.", + } + + +_BOX_PARSER = { # name-suffix token -> (cpp box type, MEOS parser, header) + "stbox": ("STBox", "stbox_in", "meos_geo.h"), + "tbox": ("TBox", "tbox_in", "meos.h"), + "tstzspan": ("Span", "tstzspan_in", "meos.h"), +} + + +# C arg-type -> (cpp box type, MEOS parser, header). Used for the box-first form +# where the box token is not the function-name suffix. STBox/TBox only: a bare +# `Span*` is ambiguous (tstzspan vs floatspan/numspan) so the box-first path +# skips it — the temporal-first path keeps resolving Span via the name suffix. +_BOXTYPE_PARSER = { + "STBox*": ("STBox", "stbox_in", "meos_geo.h"), + "TBox*": ("TBox", "tbox_in", "meos.h"), +} + + +def temporal_x_box(fn, ret, args): + """int|double|bool fn over a Temporal and an STBox/TBox/Span query LITERAL, + in EITHER argument order (e.g. `left_tspatial_stbox(temp, box)` and + `above_stbox_tspatial(box, temp)`). The literal is parsed at runtime + (stbox_in/tbox_in/tstzspan_in). For the temporal-first form the box type is + the name suffix (distinguishing tstzspan from numspan); for the box-first + form it is the C arg type (STBox/TBox).""" + if len(args) != 2: + return None + rk = {"int": "int", "double": "double", "bool": "bool"}.get(ret) + inp = _infer_input(fn) + if not rk or not inp: + return None + box_first = False + if args[0] == "Temporal*" and args[1] in ("STBox*", "TBox*", "Span*"): + tok = next((t for t in _BOX_PARSER if fn.endswith("_" + t)), None) + if not tok: + return None + bt, parser, hdr = _BOX_PARSER[tok] + elif args[1] == "Temporal*" and args[0] in _BOXTYPE_PARSER: + bt, parser, hdr = _BOXTYPE_PARSER[args[0]] + box_first = True + else: + return None + d = { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": inp, "return_kind": rk, + "extra_args": [{"kind": "box", "box_type": bt, "parser": parser, "header": hdr}], + "comment_one_liner": f"Per-event {fn}: single-instant {inp} against a {bt} literal -> {rk}.", + } + if box_first: + d["box_first"] = True + return d + + +def stbox_x_stbox(fn, ret, args): + """bool|double fn(const STBox*, const STBox*) — a cross-vehicle comparison over + two per-vehicle extent boxes (each carried as a VARSIZED stbox-text field, e.g. + two TSPATIAL_EXTENT outputs in a self-join). The first box is the primary + stbox_text input; the second is a `box` extra arg; both are stbox_in-parsed and + freed. This is the production-faithful cross-stream shape: per-vehicle + aggregates (GROUP BY vehicle_id) compared pairwise downstream.""" + if len(args) != 2 or args[0] != "STBox*" or args[1] != "STBox*": + return None + rk = {"bool": "bool", "double": "double", "int": "int"}.get(ret) + if not rk: + return None + return { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": "stbox_text", "return_kind": rk, + "extra_args": [{"kind": "box", "box_type": "STBox", "parser": "stbox_in", "header": "meos_geo.h"}], + "comment_one_liner": f"Per-event {fn}: two per-vehicle extent STBoxes -> {rk}.", + } + + +def two_temporal_scalar(fn, ret, args): + """bool|int|double fn(const Temporal*, const Temporal*) over TWO temporal + operands carried as hex-WKB VARSIZED fields — the cross-vehicle f(trajA, trajB) + scalar shape (e.g. two per-vehicle aggregate outputs compared in a self-join). + The first temporal is the primary wkb_temporal input; the second is a + wkb_temporal extra arg; both temporal_from_hexwkb-parsed and freed.""" + if len(args) != 2 or args[0] != "Temporal*" or args[1] != "Temporal*": + return None + rk = {"bool": "bool", "int": "int", "double": "double"}.get(ret) + if not rk: + return None + # the meos_call's type may live outside meos.h/meos_geo.h + extra_headers = [] + if "tnpoint" in fn: + extra_headers = ["meos_npoint.h"] + elif "tpose" in fn or "trgeometry" in fn: + extra_headers = ["meos_pose.h"] + d = { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": "wkb_temporal", "return_kind": rk, + "extra_args": [{"kind": "wkb_temporal"}], + "comment_one_liner": f"Per-event {fn}: two hex-WKB temporal operands -> {rk}.", + } + if extra_headers: + d["extra_headers"] = extra_headers + return d + + +def two_temporal_temporal(fn, ret, args): + """Temporal* fn(const Temporal*, const Temporal*) over TWO temporal operands + carried as hex-WKB VARSIZED fields, returning a Temporal* serialized back to + hex-WKB VARSIZED — the cross-vehicle f(trajA, trajB) -> trajectory shape + (temporal distance / arithmetic / topology between two per-vehicle aggregate + outputs in a self-join). Both operands temporal_from_hexwkb-parsed and freed; + the result temporal_as_hexwkb-serialized into the arena and the MEOS result + freed. The output VARSIZED can itself feed another per-event MEOS operator.""" + if len(args) != 2 or args[0] != "Temporal*" or args[1] != "Temporal*": + return None + if ret != "Temporal*": + return None + # the meos_call symbol may live outside meos.h/meos_geo.h + extra_headers = [] + if "tcbuffer" in fn: + extra_headers = ["meos_cbuffer.h"] + elif "tnpoint" in fn: + extra_headers = ["meos_npoint.h"] + elif "tpose" in fn or "trgeometry" in fn: + extra_headers = ["meos_pose.h"] + d = { + "nebula_name": pascal(fn), "sql_token": fn.upper(), "meos_call": fn, + "build_generic": True, "input_type": "wkb_temporal", "return_kind": "wkb", + "extra_args": [{"kind": "wkb_temporal"}], + "comment_one_liner": f"Per-event {fn}: two hex-WKB temporal operands -> hex-WKB temporal.", + } + if extra_headers: + d["extra_headers"] = extra_headers + return d + + +# --- Trgeometry spatial predicate shapes (W148/W149 wave) ------------------- +# MEOS normalizes GSERIALIZED* -> "int*" in the parse_sigs output (the IDL +# carries it as "const int *"; after strip-const + split it becomes "int*"). +# +# Five classifiers, each selecting the correct emit_trgeometry_operator build key: +# +# trgeometry_geo_predicate (Temporal*, int*) int — e/a intersects/disjoint/covers/touches +# geo_trgeometry_predicate (int*, Temporal*) int — geo-first: econtains/acontains/ecovers/acovers +# trgeometry_geo_dwithin (Temporal*, int*, double) int — edwithin/adwithin with distance +# trgeometry_trgeometry_predicate (Temporal*, Temporal*) int — both-trgeometry predicates +# trgeometry_trgeometry_dwithin (Temporal*, Temporal*, double) int — both-trgeometry dwithin +# +# Each covers the "compact" (trgeometryinst_make) subtree; the "nad" subtypes +# (ever_eq/always_eq/nad_) are caught by the same arg-shape but different name +# prefixes. The classifier checks name tokens to pick the right build key. + +_TRGEO_NAME_IS_EQ_NE = frozenset(["ever_eq", "ever_ne", "always_eq", "always_ne"]) + + +def _is_eq_ne(fn): + return any(fn.startswith(p + "_") for p in _TRGEO_NAME_IS_EQ_NE) + + +def _trgeo_brief(fn): + """Derive the short brief string matching the probe's comment_one_liner.""" + verb = fn.split("_")[0] # eintersects / adisjoint / ever / always / nad + if verb == "nad": + if fn.endswith("_geo"): + return ("Returns the nearest approach distance between a 2D trgeometry " + "instant and a static geometry.") + return "Returns the nearest approach distance between two 2D trgeometry instants." + if verb in ("ever", "always"): + # ever_eq / ever_ne / always_eq / always_ne + op2 = fn.split("_")[1] # eq or ne + adj = "equal" if op2 == "eq" else "not equal" + quant = "always" if verb == "always" else "ever" + if "_trgeometry_geo" in fn: + return (f"Returns 1.0 if the 2D trgeometry instant is {quant} {adj} " + f"to the static geometry.") + if "_geo_trgeometry" in fn: + return (f"Returns 1.0 if the static geometry is {quant} {adj} " + f"to the 2D trgeometry instant.") + return f"Returns 1.0 if the two 2D trgeometry instants are {quant} {adj}." + # dwithin variants have a dist arg — use a specific phrasing + if verb in ("edwithin", "adwithin"): + if "_trgeometry_geo" in fn: + return (f"Returns 1 if the trgeometry instant is within dist of the geometry " + f"({verb}).") + return f"Returns 1 if the two trgeometry instants are within dist ({verb})." + # remaining spatial predicates: eintersects / adisjoint / ecovers / … + if "_geo_trgeometry" in fn: + return f"Returns 1 if the geometry {verb} the trgeometry instant." + if "_trgeometry_geo" in fn: + return f"Returns 1 if the trgeometry instant {verb} the geometry." + return f"Returns 1 if the two trgeometry instants {verb}." + + +def trgeometry_geo_predicate(fn, ret, args): + """int fn(Temporal*, int*) — trgeometry_geo spatial predicates and eq/ne. + + Routes to build_trgeometry_geo (compact, trgeometryinst_make) for the + spatial-predicate families (eintersects/adisjoint/ecovers/etouches/…) and + to build_trgeometry_geo_nad (nad, trgeoinst_make) for ever_eq/always_eq/…""" + if ret != "int" or args != ("Temporal*", "int*"): + return None + # Must be a trgeometry function (not a plain tgeo/tpoint that hits "int*" too) + if "trgeometry" not in fn: + return None + build_key = "build_trgeometry_geo_nad" if _is_eq_ne(fn) else "build_trgeometry_geo" + d = { + "nebula_name": "".join(p.capitalize() for p in fn.split("_")), + "sql_token": fn.upper(), + "meos_call": fn, + "return_type": "int", + "nautilus_return": "INT32", + build_key: True, + "comment_one_liner": _trgeo_brief(fn), + } + return d + + +def geo_trgeometry_predicate(fn, ret, args): + """int fn(int*, Temporal*) — geo-first trgeometry predicates and eq/ne. + + Routes to build_geo_trgeometry (compact, trgeometryinst_make) for spatial + predicates (econtains/acontains/ecovers/acovers_geo_trgeometry) and to + build_geo_trgeometry_eq (nad, trgeoinst_make) for ever_eq/always_eq geo-first.""" + if ret != "int" or args != ("int*", "Temporal*"): + return None + if "trgeometry" not in fn: + return None + build_key = "build_geo_trgeometry_eq" if _is_eq_ne(fn) else "build_geo_trgeometry" + d = { + "nebula_name": "".join(p.capitalize() for p in fn.split("_")), + "sql_token": fn.upper(), + "meos_call": fn, + "return_type": "int", + "nautilus_return": "INT32", + build_key: True, + "comment_one_liner": _trgeo_brief(fn), + } + return d + + +def trgeometry_geo_dwithin(fn, ret, args): + """int fn(Temporal*, int*, double) — trgeometry_geo dwithin with distance arg.""" + if ret != "int" or args != ("Temporal*", "int*", "double"): + return None + if "trgeometry" not in fn: + return None + d = { + "nebula_name": "".join(p.capitalize() for p in fn.split("_")), + "sql_token": fn.upper(), + "meos_call": fn, + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_with_dist": True, + "comment_one_liner": _trgeo_brief(fn), + } + return d + + +def trgeometry_trgeometry_predicate(fn, ret, args): + """int fn(Temporal*, Temporal*) — trgeometry-vs-trgeometry predicates. + + Routes to build_trgeometry_trgeometry (compact) for spatial predicates and + to build_trgeometry_trgeometry_nad (nad, trgeoinst_make) for ever_eq/always_eq. + Also covers nad_trgeometry_trgeometry (double) via the double branch below — + this classifier handles only int-returning variants.""" + if ret != "int" or args != ("Temporal*", "Temporal*"): + return None + if "trgeometry" not in fn: + return None + build_key = ("build_trgeometry_trgeometry_nad" if _is_eq_ne(fn) + else "build_trgeometry_trgeometry") + d = { + "nebula_name": "".join(p.capitalize() for p in fn.split("_")), + "sql_token": fn.upper(), + "meos_call": fn, + "return_type": "int", + "nautilus_return": "INT32", + build_key: True, + "comment_one_liner": _trgeo_brief(fn), + } + return d + + +def trgeometry_trgeometry_dwithin(fn, ret, args): + """int fn(Temporal*, Temporal*, double) — trgeometry dwithin with distance.""" + if ret != "int" or args != ("Temporal*", "Temporal*", "double"): + return None + if "trgeometry" not in fn: + return None + d = { + "nebula_name": "".join(p.capitalize() for p in fn.split("_")), + "sql_token": fn.upper(), + "meos_call": fn, + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_with_dist": True, + "comment_one_liner": _trgeo_brief(fn), + } + return d + + +def trgeometry_nad(fn, ret, args): + """double fn(Temporal*, int* | Temporal*) — nad nearest-approach-distance. + + Two sub-shapes: trgeometry_geo (Temporal*, int*) and trgeometry_trgeometry + (Temporal*, Temporal*). Both emit double-returning nad layouts.""" + if ret != "double" or "trgeometry" not in fn or not fn.startswith("nad_"): + return None + if args == ("Temporal*", "int*"): + build_key = "build_nad_trgeometry_geo" + elif args == ("Temporal*", "Temporal*"): + build_key = "build_nad_trgeometry_trgeometry" + else: + return None + return { + "nebula_name": "".join(p.capitalize() for p in fn.split("_")), + "sql_token": fn.upper(), + "meos_call": fn, + "return_type": "double", + "nautilus_return": "FLOAT64", + build_key: True, + "comment_one_liner": _trgeo_brief(fn), + } + + +SHAPES = { + "cmp_scalar_tempfirst": cmp_scalar_tempfirst, + "cmp_scalar_scalarfirst": cmp_scalar_scalarfirst, + "cmp_two_temporal": cmp_two_temporal, + "two_temporal_scalar": two_temporal_scalar, + "two_temporal_temporal": two_temporal_temporal, + "sprel_scalar_existing": sprel_scalar_existing, + "temporal_unary_scalar": temporal_unary_scalar, + "temporal_x_scalar": temporal_x_scalar, + "temporal_x_geom": temporal_x_geom, + "temporal_extract_scalar": temporal_extract_scalar, + "temporal_x_box": temporal_x_box, + "stbox_x_stbox": stbox_x_stbox, + "trgeometry_geo_predicate": trgeometry_geo_predicate, + "geo_trgeometry_predicate": geo_trgeometry_predicate, + "trgeometry_geo_dwithin": trgeometry_geo_dwithin, + "trgeometry_trgeometry_predicate": trgeometry_trgeometry_predicate, + "trgeometry_trgeometry_dwithin": trgeometry_trgeometry_dwithin, + "trgeometry_nad": trgeometry_nad, +} + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--sigs", required=True, help="header signature dump") + ap.add_argument("--gap", required=True, help="streamable-not-wired function list") + ap.add_argument("--shapes", required=True, + help="comma-separated SHAPE names to apply (order = match priority)") + ap.add_argument("--out", required=True, help="descriptor JSON output path") + a = ap.parse_args() + + sigs = parse_sigs(a.sigs) + gap = {ln.strip() for ln in open(a.gap) if ln.strip()} + shapes = [SHAPES[s] for s in a.shapes.split(",")] + + ops, unmatched = [], [] + for fn in sorted(gap): + if fn not in sigs: + continue + ret, args = sigs[fn] + for cls in shapes: + d = cls(fn, ret, args) + if d: + ops.append(d) + break + else: + unmatched.append(fn) + + json.dump({"_comment": f"codegen descriptor; shapes={a.shapes}", "operators": ops}, + open(a.out, "w"), indent=2) + sys.stderr.write(f"emitted {len(ops)} operator descriptor(s) -> {a.out}\n") + sys.stderr.write(f"(gap functions present in sig-dump but unmatched by these shapes: " + f"{len([f for f in unmatched if f in sigs])})\n") + + +if __name__ == "__main__": + main() diff --git a/tools/codegen/build_local.sh b/tools/codegen/build_local.sh new file mode 100755 index 0000000000..a3d78c139a --- /dev/null +++ b/tools/codegen/build_local.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# +# Local compile-check of the generated MEOS operator + parser libraries in the +# NebulaStream dev image. +# +# The dev image ships without PahoMqttCpp (CI's image has it), so a configure +# that activates the optional MQTT Source/Sink plugins fails. Those plugins are +# irrelevant to the MEOS operator libraries, so this wrapper disables them for +# the local configure and ALWAYS restores nes-plugins/CMakeLists.txt afterwards +# (trap on EXIT) — no manual sed, and the working tree is never left modified +# even if the build fails or is interrupted. +# +# Usage: +# tools/codegen/build_local.sh [target ...] # default: the 3 op/parser libs +# NES_DEV_IMAGE=... BUILD_DIR=... tools/codegen/build_local.sh +# +set -euo pipefail +ROOT="$(git rev-parse --show-toplevel)" +PLUGINS="$ROOT/nes-plugins/CMakeLists.txt" +IMAGE="${NES_DEV_IMAGE:-localhost/nes-development:mobilitynebula-v3}" +BUILD_DIR="${BUILD_DIR:-build-w15}" +TARGETS="${*:-nes-physical-operators nes-logical-operators nes-sql-parser}" + +restore() { git -C "$ROOT" checkout -- "$PLUGINS" 2>/dev/null || true; } +trap restore EXIT + +# Disable the optional MQTT plugins for the local configure (absent in this image). +sed -i 's#"Sources/MQTTSource" ON)#"Sources/MQTTSource" OFF)#; s#"Sinks/MQTTSink" ON)#"Sinks/MQTTSink" OFF)#' "$PLUGINS" + +podman run --rm -v "$ROOT":/workspace -w /workspace "$IMAGE" \ + bash -lc "cmake --build '$BUILD_DIR' --target $TARGETS -j 8 -- -k 0; echo \"### EXIT=\$?\"" diff --git a/tools/codegen/canonical-new-ops-descriptor.json b/tools/codegen/canonical-new-ops-descriptor.json new file mode 100644 index 0000000000..35f189809f --- /dev/null +++ b/tools/codegen/canonical-new-ops-descriptor.json @@ -0,0 +1,1714 @@ +{ + "_comment": "Canonical-surface new ops: 85 operators covering tcbuffer/cbuffer, tquadbin, AcoversGeoTgeo, tfloat-trig, tnumber-abs, teq/tne/tlt/tle/tgt/tge comparisons, geom format/transform/buffer, H3/JSON/span constructors, tpcpoint predicates.", + "operators": [ + { + "nebula_name": "AcontainsTcbufferCbuffer", + "sql_token": "ACONTAINS_TCBUFFER_CBUFFER", + "meos_call": "acontains_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event acontains_tcbuffer_cbuffer." + }, + { + "nebula_name": "AcoversTcbufferCbuffer", + "sql_token": "ACOVERS_TCBUFFER_CBUFFER", + "meos_call": "acovers_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event acovers_tcbuffer_cbuffer." + }, + { + "nebula_name": "AdisjointTcbufferCbuffer", + "sql_token": "ADISJOINT_TCBUFFER_CBUFFER", + "meos_call": "adisjoint_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event adisjoint_tcbuffer_cbuffer." + }, + { + "nebula_name": "AintersectsTcbufferCbuffer", + "sql_token": "AINTERSECTS_TCBUFFER_CBUFFER", + "meos_call": "aintersects_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event aintersects_tcbuffer_cbuffer." + }, + { + "nebula_name": "AtouchesTcbufferCbuffer", + "sql_token": "ATOUCHES_TCBUFFER_CBUFFER", + "meos_call": "atouches_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event atouches_tcbuffer_cbuffer." + }, + { + "nebula_name": "EcontainsTcbufferCbuffer", + "sql_token": "ECONTAINS_TCBUFFER_CBUFFER", + "meos_call": "econtains_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event econtains_tcbuffer_cbuffer." + }, + { + "nebula_name": "EcoversTcbufferCbuffer", + "sql_token": "ECOVERS_TCBUFFER_CBUFFER", + "meos_call": "ecovers_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event ecovers_tcbuffer_cbuffer." + }, + { + "nebula_name": "EdisjointTcbufferCbuffer", + "sql_token": "EDISJOINT_TCBUFFER_CBUFFER", + "meos_call": "edisjoint_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event edisjoint_tcbuffer_cbuffer." + }, + { + "nebula_name": "EintersectsTcbufferCbuffer", + "sql_token": "EINTERSECTS_TCBUFFER_CBUFFER", + "meos_call": "eintersects_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event eintersects_tcbuffer_cbuffer." + }, + { + "nebula_name": "EtouchesTcbufferCbuffer", + "sql_token": "ETOUCHES_TCBUFFER_CBUFFER", + "meos_call": "etouches_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event etouches_tcbuffer_cbuffer." + }, + { + "nebula_name": "NadTcbufferCbuffer", + "sql_token": "NAD_TCBUFFER_CBUFFER", + "meos_call": "nad_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "FLOAT64", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "UINT64", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VARSIZED", + "cpp_type": "VariableSizedData" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event nad_tcbuffer_cbuffer." + }, + { + "nebula_name": "AlwaysEqTquadbinTquadbin", + "sql_token": "ALWAYSEQ_TQUADBIN_TQUADBIN", + "meos_call": "always_eq_tquadbin_tquadbin", + "input_type": "tquadbin", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event always_eq_tquadbin_tquadbin." + }, + { + "nebula_name": "AlwaysNeTquadbinTquadbin", + "sql_token": "ALWAYSNE_TQUADBIN_TQUADBIN", + "meos_call": "always_ne_tquadbin_tquadbin", + "input_type": "tquadbin", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event always_ne_tquadbin_tquadbin." + }, + { + "nebula_name": "EverEqTquadbinTquadbin", + "sql_token": "EVEREQ_TQUADBIN_TQUADBIN", + "meos_call": "ever_eq_tquadbin_tquadbin", + "input_type": "tquadbin", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event ever_eq_tquadbin_tquadbin." + }, + { + "nebula_name": "EverNeTquadbinTquadbin", + "sql_token": "EVERNE_TQUADBIN_TQUADBIN", + "meos_call": "ever_ne_tquadbin_tquadbin", + "input_type": "tquadbin", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event ever_ne_tquadbin_tquadbin." + }, + { + "nebula_name": "AlwaysEqQuadbinTquadbin", + "sql_token": "ALWAYSEQ_QUADBIN_TQUADBIN", + "meos_call": "always_eq_quadbin_tquadbin", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + }, + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event always_eq_quadbin_tquadbin." + }, + { + "nebula_name": "AlwaysNeQuadbinTquadbin", + "sql_token": "ALWAYSNE_QUADBIN_TQUADBIN", + "meos_call": "always_ne_quadbin_tquadbin", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + }, + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event always_ne_quadbin_tquadbin." + }, + { + "nebula_name": "EverEqQuadbinTquadbin", + "sql_token": "EVEREQ_QUADBIN_TQUADBIN", + "meos_call": "ever_eq_quadbin_tquadbin", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + }, + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event ever_eq_quadbin_tquadbin." + }, + { + "nebula_name": "EverNeQuadbinTquadbin", + "sql_token": "EVERNE_QUADBIN_TQUADBIN", + "meos_call": "ever_ne_quadbin_tquadbin", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + }, + { + "kind": "tquadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event ever_ne_quadbin_tquadbin." + }, + { + "nebula_name": "AcoversGeoTgeo", + "sql_token": "ACOVERS_GEO_TGEO", + "meos_call": "acovers_geo_tgeo", + "input_type": "geom_wkt", + "return_kind": "int", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event acovers_geo_tgeo." + }, + { + "nebula_name": "TfloatCos", + "sql_token": "TFLOAT_COS", + "meos_call": "tfloat_cos", + "input_type": "tfloat", + "return_kind": "extract_double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Per-event tfloat_cos." + }, + { + "nebula_name": "TfloatSin", + "sql_token": "TFLOAT_SIN", + "meos_call": "tfloat_sin", + "input_type": "tfloat", + "return_kind": "extract_double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Per-event tfloat_sin." + }, + { + "nebula_name": "TfloatTan", + "sql_token": "TFLOAT_TAN", + "meos_call": "tfloat_tan", + "input_type": "tfloat", + "return_kind": "extract_double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Per-event tfloat_tan." + }, + { + "nebula_name": "TfloatDegrees", + "sql_token": "TFLOAT_DEGREES", + "meos_call": "tfloat_degrees", + "input_type": "tfloat", + "return_kind": "extract_double", + "extra_headers": [], + "extra_args": [ + { + "kind": "bool_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tfloat_degrees." + }, + { + "nebula_name": "TnumberAbs", + "sql_token": "TNUMBER_ABS", + "meos_call": "tnumber_abs", + "input_type": "wkb_temporal", + "return_kind": "extract_double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Per-event tnumber_abs." + }, + { + "nebula_name": "TeqTfloatFloat", + "sql_token": "TEQ_TFLOAT_FLOAT", + "meos_call": "teq_tfloat_float", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_tfloat_float." + }, + { + "nebula_name": "TeqFloatTfloat", + "sql_token": "TEQ_FLOAT_TFLOAT", + "meos_call": "teq_float_tfloat", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_float_tfloat.", + "scalar_first": true + }, + { + "nebula_name": "TeqTintInt", + "sql_token": "TEQ_TINT_INT", + "meos_call": "teq_tint_int", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_tint_int." + }, + { + "nebula_name": "TeqIntTint", + "sql_token": "TEQ_INT_TINT", + "meos_call": "teq_int_tint", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_int_tint.", + "scalar_first": true + }, + { + "nebula_name": "TeqTtextText", + "sql_token": "TEQ_TTEXT_TEXT", + "meos_call": "teq_ttext_text", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_ttext_text." + }, + { + "nebula_name": "TeqTextTtext", + "sql_token": "TEQ_TEXT_TTEXT", + "meos_call": "teq_text_ttext", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_text_ttext.", + "scalar_first": true + }, + { + "nebula_name": "TeqTemporalTemporal", + "sql_token": "TEQ_TEMPORAL_TEMPORAL", + "meos_call": "teq_temporal_temporal", + "input_type": "wkb_temporal", + "return_kind": "bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event teq_temporal_temporal." + }, + { + "nebula_name": "TneTfloatFloat", + "sql_token": "TNE_TFLOAT_FLOAT", + "meos_call": "tne_tfloat_float", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_tfloat_float." + }, + { + "nebula_name": "TneFloatTfloat", + "sql_token": "TNE_FLOAT_TFLOAT", + "meos_call": "tne_float_tfloat", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_float_tfloat.", + "scalar_first": true + }, + { + "nebula_name": "TneTintInt", + "sql_token": "TNE_TINT_INT", + "meos_call": "tne_tint_int", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_tint_int." + }, + { + "nebula_name": "TneIntTint", + "sql_token": "TNE_INT_TINT", + "meos_call": "tne_int_tint", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_int_tint.", + "scalar_first": true + }, + { + "nebula_name": "TneTtextText", + "sql_token": "TNE_TTEXT_TEXT", + "meos_call": "tne_ttext_text", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_ttext_text." + }, + { + "nebula_name": "TneTextTtext", + "sql_token": "TNE_TEXT_TTEXT", + "meos_call": "tne_text_ttext", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_text_ttext.", + "scalar_first": true + }, + { + "nebula_name": "TneTemporalTemporal", + "sql_token": "TNE_TEMPORAL_TEMPORAL", + "meos_call": "tne_temporal_temporal", + "input_type": "wkb_temporal", + "return_kind": "bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tne_temporal_temporal." + }, + { + "nebula_name": "TltTfloatFloat", + "sql_token": "TLT_TFLOAT_FLOAT", + "meos_call": "tlt_tfloat_float", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_tfloat_float." + }, + { + "nebula_name": "TltFloatTfloat", + "sql_token": "TLT_FLOAT_TFLOAT", + "meos_call": "tlt_float_tfloat", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_float_tfloat.", + "scalar_first": true + }, + { + "nebula_name": "TltTintInt", + "sql_token": "TLT_TINT_INT", + "meos_call": "tlt_tint_int", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_tint_int." + }, + { + "nebula_name": "TltIntTint", + "sql_token": "TLT_INT_TINT", + "meos_call": "tlt_int_tint", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_int_tint.", + "scalar_first": true + }, + { + "nebula_name": "TltTtextText", + "sql_token": "TLT_TTEXT_TEXT", + "meos_call": "tlt_ttext_text", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_ttext_text." + }, + { + "nebula_name": "TltTextTtext", + "sql_token": "TLT_TEXT_TTEXT", + "meos_call": "tlt_text_ttext", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_text_ttext.", + "scalar_first": true + }, + { + "nebula_name": "TltTemporalTemporal", + "sql_token": "TLT_TEMPORAL_TEMPORAL", + "meos_call": "tlt_temporal_temporal", + "input_type": "wkb_temporal", + "return_kind": "bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tlt_temporal_temporal." + }, + { + "nebula_name": "TleTfloatFloat", + "sql_token": "TLE_TFLOAT_FLOAT", + "meos_call": "tle_tfloat_float", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_tfloat_float." + }, + { + "nebula_name": "TleFloatTfloat", + "sql_token": "TLE_FLOAT_TFLOAT", + "meos_call": "tle_float_tfloat", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_float_tfloat.", + "scalar_first": true + }, + { + "nebula_name": "TleTintInt", + "sql_token": "TLE_TINT_INT", + "meos_call": "tle_tint_int", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_tint_int." + }, + { + "nebula_name": "TleIntTint", + "sql_token": "TLE_INT_TINT", + "meos_call": "tle_int_tint", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_int_tint.", + "scalar_first": true + }, + { + "nebula_name": "TleTtextText", + "sql_token": "TLE_TTEXT_TEXT", + "meos_call": "tle_ttext_text", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_ttext_text." + }, + { + "nebula_name": "TleTextTtext", + "sql_token": "TLE_TEXT_TTEXT", + "meos_call": "tle_text_ttext", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_text_ttext.", + "scalar_first": true + }, + { + "nebula_name": "TleTemporalTemporal", + "sql_token": "TLE_TEMPORAL_TEMPORAL", + "meos_call": "tle_temporal_temporal", + "input_type": "wkb_temporal", + "return_kind": "bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tle_temporal_temporal." + }, + { + "nebula_name": "TgtTfloatFloat", + "sql_token": "TGT_TFLOAT_FLOAT", + "meos_call": "tgt_tfloat_float", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_tfloat_float." + }, + { + "nebula_name": "TgtFloatTfloat", + "sql_token": "TGT_FLOAT_TFLOAT", + "meos_call": "tgt_float_tfloat", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_float_tfloat.", + "scalar_first": true + }, + { + "nebula_name": "TgtTintInt", + "sql_token": "TGT_TINT_INT", + "meos_call": "tgt_tint_int", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_tint_int." + }, + { + "nebula_name": "TgtIntTint", + "sql_token": "TGT_INT_TINT", + "meos_call": "tgt_int_tint", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_int_tint.", + "scalar_first": true + }, + { + "nebula_name": "TgtTtextText", + "sql_token": "TGT_TTEXT_TEXT", + "meos_call": "tgt_ttext_text", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_ttext_text." + }, + { + "nebula_name": "TgtTextTtext", + "sql_token": "TGT_TEXT_TTEXT", + "meos_call": "tgt_text_ttext", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_text_ttext.", + "scalar_first": true + }, + { + "nebula_name": "TgtTemporalTemporal", + "sql_token": "TGT_TEMPORAL_TEMPORAL", + "meos_call": "tgt_temporal_temporal", + "input_type": "wkb_temporal", + "return_kind": "bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tgt_temporal_temporal." + }, + { + "nebula_name": "TgeTfloatFloat", + "sql_token": "TGE_TFLOAT_FLOAT", + "meos_call": "tge_tfloat_float", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_tfloat_float." + }, + { + "nebula_name": "TgeFloatTfloat", + "sql_token": "TGE_FLOAT_TFLOAT", + "meos_call": "tge_float_tfloat", + "input_type": "tfloat", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_float_tfloat.", + "scalar_first": true + }, + { + "nebula_name": "TgeTintInt", + "sql_token": "TGE_TINT_INT", + "meos_call": "tge_tint_int", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_tint_int." + }, + { + "nebula_name": "TgeIntTint", + "sql_token": "TGE_INT_TINT", + "meos_call": "tge_int_tint", + "input_type": "tint", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_int_tint.", + "scalar_first": true + }, + { + "nebula_name": "TgeTtextText", + "sql_token": "TGE_TTEXT_TEXT", + "meos_call": "tge_ttext_text", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_ttext_text." + }, + { + "nebula_name": "TgeTextTtext", + "sql_token": "TGE_TEXT_TTEXT", + "meos_call": "tge_text_ttext", + "input_type": "ttext", + "return_kind": "extract_bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_text_ttext.", + "scalar_first": true + }, + { + "nebula_name": "TgeTemporalTemporal", + "sql_token": "TGE_TEMPORAL_TEMPORAL", + "meos_call": "tge_temporal_temporal", + "input_type": "wkb_temporal", + "return_kind": "bool", + "extra_headers": [], + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "build_generic": true, + "comment_one_liner": "Per-event tge_temporal_temporal." + }, + { + "nebula_name": "GeoFromGeojson", + "sql_token": "GEO_FROM_GEOJSON", + "meos_call": "geo_from_geojson(std::string(jsonPtr,jsonSize).c_str())", + "input_type": "static_scalar", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "json", + "VariableSizedData" + ] + ], + "comment_one_liner": "Deserialise GeoJSON string to geometry WKT." + }, + { + "nebula_name": "GeomFromHexewkb", + "sql_token": "GEOM_FROM_HEXEWKB", + "meos_call": "geom_from_hexewkb(std::string(hexPtr,hexSize).c_str())", + "input_type": "static_scalar", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "hex", + "VariableSizedData" + ] + ], + "comment_one_liner": "Decode hex-EWKB string to geometry WKT." + }, + { + "nebula_name": "GeoAsHexewkb", + "sql_token": "GEO_AS_HEXEWKB", + "meos_call": "({std::string _s(wktPtr,wktSize),_es(endianPtr,endianSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;char* _out=geo_as_hexewkb(_gs,_es.c_str());free(_gs);_out;})", + "input_type": "static_scalar", + "return_kind": "varsized_cstring", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "wkt", + "VariableSizedData" + ], + [ + "endian", + "VariableSizedData" + ] + ], + "comment_one_liner": "Encode geometry as hex-EWKB." + }, + { + "nebula_name": "GeomMinBoundingCenter", + "sql_token": "GEOM_MIN_BOUNDING_CENTER", + "meos_call": "({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);free(_gs);_mbc.center;})", + "input_type": "static_scalar", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "wkt", + "VariableSizedData" + ] + ], + "comment_one_liner": "Centre of the minimum bounding circle of a geometry." + }, + { + "nebula_name": "GeomMinBoundingRadius", + "sql_token": "GEOM_MIN_BOUNDING_RADIUS", + "meos_call": "({std::string _s(wktPtr,wktSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0.0;MinBoundingCircle _mbc=geom_min_bounding_radius(_gs);double _r=_mbc.radius;if(_mbc.center)free(_mbc.center);free(_gs);_r;})", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "wkt", + "VariableSizedData" + ] + ], + "comment_one_liner": "Radius of the minimum bounding circle of a geometry." + }, + { + "nebula_name": "GeoTransformPipeline", + "sql_token": "GEO_TRANSFORM_PIPELINE", + "meos_call": "({std::string _s(wktPtr,wktSize),_ps(pipelinePtr,pipelineSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geo_transform_pipeline(_gs,const_cast(_ps.c_str()),(int32_t)srid_to,(bool)is_forward);free(_gs);_res;})", + "input_type": "static_scalar", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "wkt", + "VariableSizedData" + ], + [ + "pipeline", + "VariableSizedData" + ], + [ + "srid_to", + "double" + ], + [ + "is_forward", + "double" + ] + ], + "comment_one_liner": "Transform geometry through a coordinate pipeline." + }, + { + "nebula_name": "GeomBuffer", + "sql_token": "GEOM_BUFFER", + "meos_call": "({std::string _s(wktPtr,wktSize),_ps(paramsPtr,paramsSize);GSERIALIZED* _gs=geom_in(_s.c_str(),-1);if(!_gs)return 0u;GSERIALIZED* _res=geom_buffer(_gs,size,_ps.c_str());free(_gs);_res;})", + "input_type": "static_scalar", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "wkt", + "VariableSizedData" + ], + [ + "size", + "double" + ], + [ + "params", + "VariableSizedData" + ] + ], + "comment_one_liner": "Compute the buffer zone around a geometry." + }, + { + "nebula_name": "GeomRelatePattern", + "sql_token": "GEOM_RELATE_PATTERN", + "meos_call": "({std::string _s1(wkt1Ptr,wkt1Size),_s2(wkt2Ptr,wkt2Size),_sp(patternPtr,patternSize);GSERIALIZED* _gs1=geom_in(_s1.c_str(),-1);if(!_gs1)return 0.0;GSERIALIZED* _gs2=geom_in(_s2.c_str(),-1);if(!_gs2){free(_gs1);return 0.0;}bool _r=geom_relate_pattern(_gs1,_gs2,const_cast(_sp.c_str()));free(_gs1);free(_gs2);_r?1.0:0.0;})", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "wkt1", + "VariableSizedData" + ], + [ + "wkt2", + "VariableSizedData" + ], + [ + "pattern", + "VariableSizedData" + ] + ], + "comment_one_liner": "Test DE-9IM relation pattern between two geometries." + }, + { + "nebula_name": "H3GsPointToCell", + "sql_token": "H3_GS_POINT_TO_CELL", + "meos_call": "({std::string _wkt=fmt::format(\"SRID=4326;POINT({} {})\",lon,lat);GSERIALIZED* _gs=geom_in(_wkt.c_str(),-1);if(!_gs)return 0u;H3Index _cell=h3_gs_point_to_cell(_gs,(int32_t)res);free(_gs);_cell;})", + "input_type": "static_scalar", + "return_kind": "varsized_h3out", + "extra_headers": [ + "meos_h3.h", + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "lon", + "double" + ], + [ + "lat", + "double" + ], + [ + "res", + "double" + ] + ], + "comment_one_liner": "Map (lon,lat) point to H3 cell at given resolution." + }, + { + "nebula_name": "H3indexIn", + "sql_token": "H3INDEX_IN", + "meos_call": "(uint64_t)h3index_in(std::string(hexPtr,hexSize).c_str())", + "input_type": "static_scalar", + "return_kind": "uint64", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "hex", + "VariableSizedData" + ] + ], + "comment_one_liner": "Parse H3 cell index from a hex string." + }, + { + "nebula_name": "EintersectsTpcpointGeo", + "sql_token": "EINTERSECTS_TPCPOINT_GEO", + "meos_call": "({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}bool _r=eintersects_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r?1.0:0.0;})", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h", + "meos_pointcloud.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "pt_hexwkb", + "VariableSizedData" + ], + [ + "ts", + "uint64_t" + ], + [ + "tgt_wkt", + "VariableSizedData" + ] + ], + "comment_one_liner": "Ever-intersects predicate for a tpcpoint instant and a geometry." + }, + { + "nebula_name": "NadTpcpointGeo", + "sql_token": "NAD_TPCPOINT_GEO", + "meos_call": "({char* _hs=(char*)malloc(pt_hexwkbSize+1);if(!_hs)return 0.0;memcpy(_hs,pt_hexwkbPtr,pt_hexwkbSize);_hs[pt_hexwkbSize]='\\0';Pcpoint* _pt=pcpoint_from_hexwkb(_hs);free(_hs);if(!_pt)return 0.0;TInstant* _inst=tpointcloudinst_make(_pt,(TimestampTz)ts);free(_pt);if(!_inst)return 0.0;char* _gs_str=(char*)malloc(tgt_wktSize+1);if(!_gs_str){free(_inst);return 0.0;}memcpy(_gs_str,tgt_wktPtr,tgt_wktSize);_gs_str[tgt_wktSize]='\\0';GSERIALIZED* _gs=geom_in(_gs_str,-1);free(_gs_str);if(!_gs){free(_inst);return 0.0;}double _r=nad_tpcpoint_geo((Temporal*)_inst,_gs);free(_inst);free(_gs);_r;})", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h", + "meos_pointcloud.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "pt_hexwkb", + "VariableSizedData" + ], + [ + "ts", + "uint64_t" + ], + [ + "tgt_wkt", + "VariableSizedData" + ] + ], + "comment_one_liner": "Nearest-approach distance for a tpcpoint instant and a geometry." + }, + { + "nebula_name": "JsonArrayLength", + "sql_token": "JSON_ARRAY_LENGTH", + "meos_call": "({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0.0;int _n=json_array_length(_js);free(_js);(double)_n;})", + "input_type": "static_scalar", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "json", + "VariableSizedData" + ] + ], + "comment_one_liner": "Number of elements in a JSON array." + }, + { + "nebula_name": "JsonTypeof", + "sql_token": "JSON_TYPEOF", + "meos_call": "({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_typeof(_js);free(_js);_res;})", + "input_type": "static_scalar", + "return_kind": "varsized_json_out", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "json", + "VariableSizedData" + ] + ], + "comment_one_liner": "Data type of the outermost JSON element." + }, + { + "nebula_name": "JsonArrayElementText", + "sql_token": "JSON_ARRAY_ELEMENT_TEXT", + "meos_call": "({std::string _s(jsonPtr,jsonSize);text* _js=json_in(_s.c_str());if(!_js)return 0u;text* _res=json_array_element_text(_js,(int)idx);free(_js);_res;})", + "input_type": "static_scalar", + "return_kind": "varsized_json_out", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "json", + "VariableSizedData" + ], + [ + "idx", + "double" + ] + ], + "comment_one_liner": "Text value of a JSON array element at a given index." + }, + { + "nebula_name": "JsonObjectFieldText", + "sql_token": "JSON_OBJECT_FIELD_TEXT", + "meos_call": "({std::string _sj(jsonPtr,jsonSize),_sk(keyPtr,keySize);text* _js=json_in(_sj.c_str());if(!_js)return 0u;text* _key=cstring_to_text(_sk.c_str());text* _res=json_object_field_text(_js,_key);free(_js);free(_key);_res;})", + "input_type": "static_scalar", + "return_kind": "varsized_json_out", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "json", + "VariableSizedData" + ], + [ + "key", + "VariableSizedData" + ] + ], + "comment_one_liner": "Text value of a JSON object field by key." + }, + { + "nebula_name": "FloatspanMake", + "sql_token": "FLOATSPAN_MAKE", + "meos_call": "({Span* _sp=floatspan_make(lower,upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=floatspan_out(_sp,-1);free(_sp);_out;})", + "input_type": "static_scalar", + "return_kind": "varsized_floatspan", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "lower", + "double" + ], + [ + "upper", + "double" + ], + [ + "lower_inc", + "double" + ], + [ + "upper_inc", + "double" + ] + ], + "comment_one_liner": "Construct a float span from bounds and inclusivity flags." + }, + { + "nebula_name": "IntspanMake", + "sql_token": "INTSPAN_MAKE", + "meos_call": "({Span* _sp=intspan_make((int)lower,(int)upper,lower_inc!=0.0,upper_inc!=0.0);if(!_sp)return 0u;char* _out=intspan_out(_sp);free(_sp);_out;})", + "input_type": "static_scalar", + "return_kind": "varsized_intspan", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "primary_fields": [ + [ + "lower", + "double" + ], + [ + "upper", + "double" + ], + [ + "lower_inc", + "double" + ], + [ + "upper_inc", + "double" + ] + ], + "comment_one_liner": "Construct an integer span from bounds and inclusivity flags." + } + ] +} \ No newline at end of file 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_input.example.json b/tools/codegen/codegen_input.example.json new file mode 100644 index 0000000000..cbfd0ed15e --- /dev/null +++ b/tools/codegen/codegen_input.example.json @@ -0,0 +1,160 @@ +{ + "_comment": "Example input for codegen_nebula.py \u2014 first wave of MEOS spatial-relation E/A predicates. Each operator descriptor produces one logical .hpp/.cpp + one physical .hpp/.cpp file. Adjust the list to control which functions get generated.", + "operators": [ + { + "nebula_name": "TemporalEDisjointGeometry", + "sql_token": "TEMPORAL_EDISJOINT_GEOMETRY", + "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 tgeompoint built from event fields and a static geometry." + }, + { + "nebula_name": "TemporalATouchesGeometry", + "sql_token": "TEMPORAL_ATOUCHES_GEOMETRY", + "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 always-touches between a single-instant tgeompoint and a static geometry." + }, + { + "nebula_name": "TemporalECoversGeometry", + "sql_token": "TEMPORAL_ECOVERS_GEOMETRY", + "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 tgeompoint and a static geometry." + }, + { + "nebula_name": "TemporalAContainsGeometry", + "sql_token": "TEMPORAL_ACONTAINS_GEOMETRY", + "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 always-contains between a single-instant tgeompoint and a static geometry." + }, + { + "nebula_name": "TemporalETouchesGeometry", + "sql_token": "TEMPORAL_ETOUCHES_GEOMETRY", + "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 ever-touches between a single-instant tgeompoint and a static geometry." + } + ] +} diff --git a/tools/codegen/codegen_nebula.py b/tools/codegen/codegen_nebula.py new file mode 100644 index 0000000000..603d29c40d --- /dev/null +++ b/tools/codegen/codegen_nebula.py @@ -0,0 +1,6713 @@ +#!/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")) + elif kind == "raw_varsized": + # Raw VARSIZED arg passed as ptr+size; single VARSIZED field. + 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), + # The meos_call returns uint64_t (e.g. H3Index from h3index_in). + "uint64": ("uint64_t", "UINT64", "0ULL", None), + # The meos_call returns text* via json_out (json_typeof, json_array_element_text, json_object_field_text). + "varsized_json_out": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns char* from floatspan_out(Span*). + "varsized_floatspan": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns char* from intspan_out(Span*). + "varsized_intspan": ("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});") + elif kind == "raw_varsized": + # Raw VARSIZED arg: passed as (const char* ptr, uint32_t size) to the lambda. + # No parsing — the meos_call uses the ptr/size directly via std::string or c_str(). + fields.append((f"arg{i}", "VariableSizedData")) + call_terms.append(f"arg{i}Ptr, arg{i}Size") + + 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;") + elif rk == "varsized_json_out": + # callexpr → text* (from json_typeof etc.); json_out → char* cstring → copy + call_marshal = ( + f" text* tres = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!tres) return 0u;\n" + f" char* out = json_out(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_floatspan": + # callexpr → char* from floatspan_out(Span*) → copy to arena + 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_intspan": + # callexpr → char* from intspan_out(Span*) → copy to arena + 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;") + 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..0d77d8aaad --- /dev/null +++ b/tools/codegen/gen_all.py @@ -0,0 +1,65 @@ +#!/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"), + ("canonical-new-ops", "canonical-new-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/meos-idl-master.json b/tools/codegen/meos-idl-master.json new file mode 100644 index 0000000000..35a383084a --- /dev/null +++ b/tools/codegen/meos-idl-master.json @@ -0,0 +1,97078 @@ +{ + "functions": [ + { + "name": "meos_error", + "file": "meos_error.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "errlevel", + "cType": "int", + "canonical": "int" + }, + { + "name": "errcode", + "cType": "int", + "canonical": "int" + }, + { + "name": "format", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meos_errno", + "file": "meos_error.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [] + }, + { + "name": "meos_errno_set", + "file": "meos_error.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "err", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "meos_errno_restore", + "file": "meos_error.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "err", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "meos_errno_reset", + "file": "meos_error.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [] + }, + { + "name": "meos_array_create", + "file": "meos.h", + "returnType": { + "c": "MeosArray *", + "canonical": "struct MeosArray *" + }, + "params": [ + { + "name": "elem_size", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "meos_array_add", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "array", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + }, + { + "name": "value", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "meos_array_get", + "file": "meos.h", + "returnType": { + "c": "void *", + "canonical": "void *" + }, + "params": [ + { + "name": "array", + "cType": "const MeosArray *", + "canonical": "const struct MeosArray *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "meos_array_count", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "array", + "cType": "const MeosArray *", + "canonical": "const struct MeosArray *" + } + ] + }, + { + "name": "meos_array_reset", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "array", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "meos_array_reset_free", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "array", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "meos_array_destroy", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "array", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "meos_array_destroy_free", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "array", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "rtree_create_intspan", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_create_bigintspan", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_create_floatspan", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_create_datespan", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_create_tstzspan", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_create_tbox", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_create_stbox", + "file": "meos.h", + "returnType": { + "c": "RTree *", + "canonical": "struct RTree *" + }, + "params": [] + }, + { + "name": "rtree_free", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "rtree", + "cType": "RTree *", + "canonical": "struct RTree *" + } + ] + }, + { + "name": "rtree_insert", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "rtree", + "cType": "RTree *", + "canonical": "struct RTree *" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + }, + { + "name": "id", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "rtree_insert_temporal", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "rtree", + "cType": "RTree *", + "canonical": "struct RTree *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "id", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "rtree_insert_temporal_split", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "rtree", + "cType": "RTree *", + "canonical": "struct RTree *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "id", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxboxes", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "rtree_search", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "rtree", + "cType": "const RTree *", + "canonical": "const struct RTree *" + }, + { + "name": "op", + "cType": "RTreeSearchOp", + "canonical": "RTreeSearchOp" + }, + { + "name": "query", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "result", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "rtree_search_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "rtree", + "cType": "const RTree *", + "canonical": "const struct RTree *" + }, + { + "name": "op", + "cType": "RTreeSearchOp", + "canonical": "RTreeSearchOp" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "result", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "rtree_search_temporal_dedup", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "rtree", + "cType": "const RTree *", + "canonical": "const struct RTree *" + }, + { + "name": "op", + "cType": "RTreeSearchOp", + "canonical": "RTreeSearchOp" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxboxes", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "MeosArray *", + "canonical": "struct MeosArray *" + } + ] + }, + { + "name": "meos_initialize_error_handler", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "err_handler", + "cType": "error_handler_fn", + "canonical": "void (*)(int, int, const char *)" + } + ] + }, + { + "name": "meos_initialize_allocator", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "malloc_fn", + "cType": "meos_malloc_fn", + "canonical": "void *(*)(unsigned long)" + }, + { + "name": "realloc_fn", + "cType": "meos_realloc_fn", + "canonical": "void *(*)(void *, unsigned long)" + }, + { + "name": "free_fn", + "cType": "meos_free_fn", + "canonical": "void (*)(void *)" + } + ] + }, + { + "name": "meos_initialize_noexit_error_handler", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_initialize_timezone", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "name", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meos_initialize_collation", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_finalize_timezone", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_finalize_collation", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_finalize_projsrs", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_finalize_ways", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_set_datestyle", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "newval", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "extra", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "meos_set_intervalstyle", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "newval", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "extra", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "meos_get_datestyle", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [] + }, + { + "name": "meos_get_intervalstyle", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [] + }, + { + "name": "meos_set_spatial_ref_sys_csv", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "path", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meos_set_ways_csv", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "path", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meos_initialize", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "meos_finalize", + "file": "meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "bigintset_in", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "bigintset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "bigintspan_expand", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "bigintspan_in", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "bigintspan_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigintspanset_in", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "bigintspanset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "dateset_in", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "dateset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "datespan_in", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "datespan_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "datespanset_in", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "datespanset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatset_in", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "floatset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "floatspan_expand", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "floatspan_in", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "floatspan_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "floatspanset_in", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "floatspanset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intset_in", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "intset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intspan_expand", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "intspan_in", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "intspan_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intspanset_in", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "intspanset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "set_as_hexwkb", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "set_as_wkb", + "file": "meos.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "set_from_hexwkb", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "set_from_wkb", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "span_as_hexwkb", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "span_as_wkb", + "file": "meos.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "span_from_hexwkb", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "span_from_wkb", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "spanset_as_hexwkb", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "spanset_as_wkb", + "file": "meos.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "spanset_from_hexwkb", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "spanset_from_wkb", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "textset_in", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "textset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzset_in", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tstzset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzspan_in", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tstzspan_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspanset_in", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tstzspanset_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "bigintset_make", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const int64 *", + "canonical": "const long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "bigintspan_make", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "lower", + "cType": "int64", + "canonical": "long" + }, + { + "name": "upper", + "cType": "int64", + "canonical": "long" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "dateset_make", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const DateADT *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "datespan_make", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "lower", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "upper", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatset_make", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const double *", + "canonical": "const double *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "floatspan_make", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "lower", + "cType": "double", + "canonical": "double" + }, + { + "name": "upper", + "cType": "double", + "canonical": "double" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intset_make", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intspan_make", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "lower", + "cType": "int", + "canonical": "int" + }, + { + "name": "upper", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_copy", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_copy", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "spanset_copy", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_make", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "spans", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "textset_make", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tstzset_make", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const TimestampTz *", + "canonical": "const long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tstzspan_make", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "bigint_to_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "bigint_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "bigint_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "date_to_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "date_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "date_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "dateset_to_tstzset", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "datespan_to_tstzspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "datespanset_to_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "float_to_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "float_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "float_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "floatset_to_intset", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "floatspan_to_intspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspan_to_bigintspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspanset_to_intspanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "int_to_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "int_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "int_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intset_to_floatset", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intspan_to_floatspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intspan_to_bigintspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigintspan_to_intspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigintspan_to_floatspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intspanset_to_floatspanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "set_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "text_to_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "timestamptz_to_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "timestamptz_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "timestamptz_to_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tstzset_to_dateset", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzspan_to_datespan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspanset_to_datespanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "bigintset_end_value", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "bigintset_start_value", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "bigintset_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int64 *", + "canonical": "long *" + } + ] + }, + { + "name": "bigintset_values", + "file": "meos.h", + "returnType": { + "c": "int64 *", + "canonical": "long *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "bigintspan_lower", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigintspan_upper", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigintspan_width", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigintspanset_lower", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "bigintspanset_upper", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "bigintspanset_width", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "dateset_end_value", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "dateset_start_value", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "dateset_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "DateADT *", + "canonical": "int *" + } + ] + }, + { + "name": "dateset_values", + "file": "meos.h", + "returnType": { + "c": "DateADT *", + "canonical": "int *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "datespan_duration", + "file": "meos.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "datespan_lower", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "datespan_upper", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "datespanset_date_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "DateADT *", + "canonical": "int *" + } + ] + }, + { + "name": "datespanset_dates", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "datespanset_duration", + "file": "meos.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "datespanset_end_date", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "datespanset_num_dates", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "datespanset_start_date", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatset_end_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "floatset_start_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "floatset_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "floatset_values", + "file": "meos.h", + "returnType": { + "c": "double *", + "canonical": "double *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "floatspan_lower", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspan_upper", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspan_width", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspanset_lower", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatspanset_upper", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatspanset_width", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intset_end_value", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intset_start_value", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intset_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "intset_values", + "file": "meos.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "intspan_lower", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intspan_upper", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intspan_width", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intspanset_lower", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "intspanset_upper", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "intspanset_width", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_hash", + "file": "meos.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_hash_extended", + "file": "meos.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "set_num_values", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_hash", + "file": "meos.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_hash_extended", + "file": "meos.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "span_lower_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_upper_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "spanset_end_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_hash", + "file": "meos.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_hash_extended", + "file": "meos.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "spanset_lower_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_num_spans", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_span_n", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spanset_spanarr", + "file": "meos.h", + "returnType": { + "c": "Span **", + "canonical": "Span **" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_start_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_upper_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "textset_end_value", + "file": "meos.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "textset_start_value", + "file": "meos.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "textset_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "text **", + "canonical": "struct varlena **" + } + ] + }, + { + "name": "textset_values", + "file": "meos.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tstzset_end_value", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzset_start_value", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzset_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tstzset_values", + "file": "meos.h", + "returnType": { + "c": "TimestampTz *", + "canonical": "long *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tstzspan_duration", + "file": "meos.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspan_lower", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspan_upper", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspanset_duration", + "file": "meos.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tstzspanset_end_timestamptz", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tstzspanset_lower", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tstzspanset_num_timestamps", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tstzspanset_start_timestamptz", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tstzspanset_timestamps", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tstzspanset_timestamptz_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tstzspanset_upper", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "bigintset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "shift", + "cType": "int64", + "canonical": "long" + }, + { + "name": "width", + "cType": "int64", + "canonical": "long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "bigintspan_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "shift", + "cType": "int64", + "canonical": "long" + }, + { + "name": "width", + "cType": "int64", + "canonical": "long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "bigintspanset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "shift", + "cType": "int64", + "canonical": "long" + }, + { + "name": "width", + "cType": "int64", + "canonical": "long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "dateset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "datespan_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "datespanset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatset_ceil", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "floatset_degrees", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatset_floor", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "floatset_radians", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "floatset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "shift", + "cType": "double", + "canonical": "double" + }, + { + "name": "width", + "cType": "double", + "canonical": "double" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatspan_ceil", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspan_degrees", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatspan_floor", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspan_radians", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "floatspan_round", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "floatspan_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "shift", + "cType": "double", + "canonical": "double" + }, + { + "name": "width", + "cType": "double", + "canonical": "double" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatspanset_ceil", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatspanset_floor", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatspanset_degrees", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "floatspanset_radians", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "floatspanset_round", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "floatspanset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "shift", + "cType": "double", + "canonical": "double" + }, + { + "name": "width", + "cType": "double", + "canonical": "double" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intspan_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intspanset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tstzspan_expand", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "set_round", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "textcat_text_textset", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "textcat_textset_text", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "textset_initcap", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "textset_lower", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "textset_upper", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "timestamptz_tprecision", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tstzset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tstzset_tprecision", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tstzspan_shift_scale", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tstzspan_tprecision", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tstzspanset_shift_scale", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tstzspanset_tprecision", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "set_cmp", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_eq", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_ge", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_gt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_le", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_lt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_ne", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_cmp", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_eq", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_ge", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_gt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_le", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_lt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_ne", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "spanset_cmp", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_eq", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_ge", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_gt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_le", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_lt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_ne", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "set_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_split_each_n_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "elems_per_span", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "set_split_n_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "span_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "spanset_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_split_each_n_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "elems_per_span", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "spanset_split_n_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "span_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "adjacent_span_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "adjacent_span_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "adjacent_span_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adjacent_span_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "adjacent_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "adjacent_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "adjacent_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "adjacent_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "adjacent_spanset_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "adjacent_spanset_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adjacent_spanset_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "adjacent_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "adjacent_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "adjacent_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_bigint_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_bigint_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_date_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_date_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_date_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_float_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_float_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_float_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_int_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_int_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_int_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_text_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contains_set_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "contains_set_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "contains_set_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "contains_set_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "contains_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_text", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "contains_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "contains_span_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "contains_span_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "contains_span_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "contains_span_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "contains_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contains_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contains_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "contains_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "contains_spanset_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "contains_spanset_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "contains_spanset_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "contains_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contains_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contains_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overlaps_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overlaps_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overlaps_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overlaps_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overlaps_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "after_date_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "after_date_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "after_date_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "after_set_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "after_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "after_span_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "after_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "after_spanset_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "after_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "after_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "after_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "after_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "before_date_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "before_date_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "before_date_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "before_set_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "before_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "before_span_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "before_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "before_spanset_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "before_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "before_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "before_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "before_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "left_bigint_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "left_bigint_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "left_float_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "left_float_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_float_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "left_int_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "left_int_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_int_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "left_set_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "left_set_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "left_set_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "left_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "left_set_text", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "left_span_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "left_span_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "left_span_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "left_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "left_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "left_spanset_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "left_spanset_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "left_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "left_text_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overafter_date_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overafter_date_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overafter_date_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overafter_set_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "overafter_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overafter_span_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "overafter_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overafter_spanset_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "overafter_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overafter_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overafter_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overafter_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overbefore_date_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overbefore_date_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overbefore_date_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overbefore_set_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "overbefore_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overbefore_span_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "overbefore_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overbefore_spanset_date", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "overbefore_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "overbefore_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overbefore_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overbefore_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overleft_bigint_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overleft_bigint_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overleft_float_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overleft_float_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_float_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overleft_int_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overleft_int_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_int_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overleft_set_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "overleft_set_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "overleft_set_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "overleft_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overleft_set_text", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "overleft_span_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "overleft_span_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "overleft_span_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "overleft_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overleft_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "overleft_spanset_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "overleft_spanset_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "overleft_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overleft_text_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overright_bigint_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overright_bigint_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overright_float_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overright_float_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_float_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overright_int_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overright_int_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_int_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overright_set_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "overright_set_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "overright_set_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "overright_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overright_set_text", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "overright_span_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "overright_span_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "overright_span_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "overright_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overright_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "overright_spanset_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "overright_spanset_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "overright_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overright_text_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "right_bigint_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "right_bigint_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_float_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "right_float_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_float_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_int_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "right_int_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_int_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_set_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "right_set_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "right_set_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "right_set_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "right_set_text", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "right_span_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "right_span_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "right_span_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "right_span_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_span_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "right_spanset_float", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "right_spanset_int", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "right_spanset_span", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_text_set", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_bigint_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_date_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_float_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_int_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_bigint", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "intersection_set_date", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "intersection_set_float", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "intersection_set_int", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intersection_set_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_text", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "intersection_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "intersection_span_bigint", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "intersection_span_date", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "intersection_span_float", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "intersection_span_int", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intersection_span_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intersection_span_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "intersection_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "intersection_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "intersection_spanset_date", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "intersection_spanset_float", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "intersection_spanset_int", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intersection_spanset_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intersection_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "intersection_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "intersection_text_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_bigint_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_bigint_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "minus_date_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_date_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_date_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "minus_float_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_float_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_float_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "minus_int_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_int_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_int_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "minus_set_bigint", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "minus_set_date", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "minus_set_float", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "minus_set_int", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "minus_set_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_text", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "minus_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "minus_span_bigint", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "minus_span_date", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "minus_span_float", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "minus_span_int", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "minus_span_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_span_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "minus_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "minus_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "minus_spanset_date", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "minus_spanset_float", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "minus_spanset_int", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "minus_spanset_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "minus_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "minus_text_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "union_bigint_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_bigint_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "union_bigint_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "SpanSet *", + "canonical": "SpanSet *" + } + ] + }, + { + "name": "union_date_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_date_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "union_date_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "ss", + "cType": "SpanSet *", + "canonical": "SpanSet *" + } + ] + }, + { + "name": "union_float_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_float_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "union_float_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "SpanSet *", + "canonical": "SpanSet *" + } + ] + }, + { + "name": "union_int_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_int_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "union_int_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "SpanSet *", + "canonical": "SpanSet *" + } + ] + }, + { + "name": "union_set_bigint", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "union_set_date", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "union_set_float", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "union_set_int", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "union_set_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_text", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "union_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "union_span_bigint", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "union_span_date", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "union_span_float", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "union_span_int", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "union_span_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "super_union_span_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "union_span_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "union_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "union_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "union_spanset_date", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "union_spanset_float", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "union_spanset_int", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "union_spanset_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "union_spanset_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "union_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "union_text_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_timestamptz_set", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_timestamptz_span", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "union_timestamptz_spanset", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ss", + "cType": "SpanSet *", + "canonical": "SpanSet *" + } + ] + }, + { + "name": "distance_bigintset_bigintset", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "distance_bigintspan_bigintspan", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_bigintspanset_bigintspan", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_bigintspanset_bigintspanset", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "distance_dateset_dateset", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "distance_datespan_datespan", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_datespanset_datespan", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_datespanset_datespanset", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "distance_floatset_floatset", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "distance_floatspan_floatspan", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_floatspanset_floatspan", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_floatspanset_floatspanset", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "distance_intset_intset", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "distance_intspan_intspan", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_intspanset_intspan", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_intspanset_intspanset", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "distance_set_bigint", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "distance_set_date", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "distance_set_float", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "distance_set_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "distance_set_timestamptz", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "distance_span_bigint", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "distance_span_date", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "distance_span_float", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "distance_span_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "distance_span_timestamptz", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "distance_spanset_bigint", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "distance_spanset_date", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "distance_spanset_float", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "distance_spanset_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "distance_spanset_timestamptz", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "distance_tstzset_tstzset", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "distance_tstzspan_tstzspan", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_tstzspanset_tstzspan", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_tstzspanset_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "bigint_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "bigint_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "date_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "date_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "float_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "float_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "int_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "int_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "i", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "set_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_union_finalfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + } + ] + }, + { + "name": "set_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "s", + "cType": "Set *", + "canonical": "Set *" + } + ] + }, + { + "name": "span_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_union_transfn", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "state", + "cType": "SpanSet *", + "canonical": "SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "spanset_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_union_finalfn", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "state", + "cType": "SpanSet *", + "canonical": "SpanSet *" + } + ] + }, + { + "name": "spanset_union_transfn", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "state", + "cType": "SpanSet *", + "canonical": "SpanSet *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "text_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "timestamptz_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "timestamptz_union_transfn", + "file": "meos.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "bigint_get_bin", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "value", + "cType": "int64", + "canonical": "long" + }, + { + "name": "vsize", + "cType": "int64", + "canonical": "long" + }, + { + "name": "vorigin", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "bigintspan_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "vsize", + "cType": "int64", + "canonical": "long" + }, + { + "name": "vorigin", + "cType": "int64", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "bigintspanset_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "vsize", + "cType": "int64", + "canonical": "long" + }, + { + "name": "vorigin", + "cType": "int64", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "date_get_bin", + "file": "meos.h", + "returnType": { + "c": "DateADT", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "DateADT", + "canonical": "int" + } + ] + }, + { + "name": "datespan_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "datespanset_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "DateADT", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "float_get_bin", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "value", + "cType": "double", + "canonical": "double" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "floatspan_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "floatspanset_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "int_get_bin", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "int", + "canonical": "int" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "intspan_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "intspanset_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "timestamptz_get_bin", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tstzspan_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "origin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tstzspanset_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tbox_as_hexwkb", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tbox_as_wkb", + "file": "meos.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tbox_from_hexwkb", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbox_from_wkb", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tbox_in", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbox_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "float_timestamptz_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "float_tstzspan_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "int_timestamptz_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "bigint_timestamptz_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "int_tstzspan_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "bigint_tstzspan_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "numspan_tstzspan_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "numspan_timestamptz_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tbox_copy", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_make", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "p", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "float_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "int_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "bigint_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "set_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "spanset_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tbox_to_intspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_to_bigintspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_to_floatspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_to_tstzspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "timestamptz_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tbox_hash", + "file": "meos.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_hash_extended", + "file": "meos.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tbox_hast", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_hasx", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_tmax", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tbox_tmax_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tbox_tmin", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tbox_tmin_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tbox_xmax", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tbox_xmax_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tbox_xmin", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tbox_xmin_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tboxfloat_xmax", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tboxfloat_xmin", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tboxint_xmax", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tboxbigint_xmax", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "int64 *", + "canonical": "long *" + } + ] + }, + { + "name": "tboxint_xmin", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tboxbigint_xmin", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "int64 *", + "canonical": "long *" + } + ] + }, + { + "name": "tfloatbox_expand", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tintbox_expand", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbox_expand_time", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tbox_round", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tfloatbox_shift_scale", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "shift", + "cType": "double", + "canonical": "double" + }, + { + "name": "width", + "cType": "double", + "canonical": "double" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tintbox_shift_scale", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tbox_shift_scale_time", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tbigintbox_expand", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "tbigintbox_shift_scale", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "shift", + "cType": "int64", + "canonical": "long" + }, + { + "name": "width", + "cType": "int64", + "canonical": "long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "union_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intersection_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "adjacent_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "contained_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "contains_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overlaps_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "same_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "after_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "before_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "left_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overafter_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overbefore_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overleft_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overright_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "right_tbox_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_cmp", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_eq", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_ge", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_gt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_le", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_lt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_ne", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbool_from_mfjson", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbool_in", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbool_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_as_hexwkb", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "temporal_as_mfjson", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "with_bbox", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "flags", + "cType": "int", + "canonical": "int" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + }, + { + "name": "srs", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "temporal_as_wkb", + "file": "meos.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "temporal_from_hexwkb", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "temporal_from_wkb", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tfloat_from_mfjson", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tfloat_in", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tfloat_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tint_from_mfjson", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbigint_from_mfjson", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tint_in", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbigint_in", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tint_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_from_mfjson", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "ttext_in", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "ttext_out", + "file": "meos.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_from_base_temp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tboolinst_make", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tboolseq_from_base_tstzset", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tboolseq_from_base_tstzspan", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tboolseqset_from_base_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "temporal_copy", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_from_base_temp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloatinst_make", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tfloatseq_from_base_tstzset", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tfloatseq_from_base_tstzspan", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tfloatseqset_from_base_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tint_from_base_temp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_from_base_temp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tintinst_make", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tbigintinst_make", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tintseq_from_base_tstzset", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tbigintseq_from_base_tstzset", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tintseq_from_base_tstzspan", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tbigintseq_from_base_tstzspan", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tintseqset_from_base_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tbigintseqset_from_base_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tsequence_make", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_make", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_make_gaps", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ttext_from_base_temp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttextinst_make", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "ttextseq_from_base_tstzset", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "ttextseq_from_base_tstzspan", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "ttextseqset_from_base_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tbool_to_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_to_tstzspan", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_to_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_to_tbigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_to_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_to_tbigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_to_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_to_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_to_span", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_to_tbox", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_end_value", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_start_value", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_value_at_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tbool_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tbool_values", + "file": "meos.h", + "returnType": { + "c": "bool *", + "canonical": "_Bool *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_duration", + "file": "meos.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_end_instant", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_end_sequence", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_end_timestamptz", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_hash", + "file": "meos.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_instant_n", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_instants", + "file": "meos.h", + "returnType": { + "c": "TInstant **", + "canonical": "TInstant **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_interp", + "file": "meos.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_lower_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_max_instant", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_min_instant", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_num_instants", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_num_sequences", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_num_timestamps", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_segm_duration", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "atleast", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_segments", + "file": "meos.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_sequence_n", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_sequences", + "file": "meos.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_start_instant", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_start_sequence", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_start_timestamptz", + "file": "meos.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_stops", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "minduration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_subtype", + "file": "meos.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_basetype_name", + "file": "meos.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_time", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_timestamps", + "file": "meos.h", + "returnType": { + "c": "TimestampTz *", + "canonical": "long *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_timestamptz_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "temporal_upper_inc", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_end_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_min_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_max_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_start_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_value_at_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tfloat_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tfloat_values", + "file": "meos.h", + "returnType": { + "c": "double *", + "canonical": "double *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_end_value", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_end_value", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_max_value", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_max_value", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_min_value", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_min_value", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_start_value", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_start_value", + "file": "meos.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbigint_value_at_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "int64 *", + "canonical": "long *" + } + ] + }, + { + "name": "tint_value_at_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tbigint_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int64", + "canonical": "long" + }, + { + "name": "result", + "cType": "int64 *", + "canonical": "long *" + } + ] + }, + { + "name": "tint_values", + "file": "meos.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tbigint_values", + "file": "meos.h", + "returnType": { + "c": "int64 *", + "canonical": "long *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int32 *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_avg_value", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_integral", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_twavg", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_valuespans", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_end_value", + "file": "meos.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_max_value", + "file": "meos.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_min_value", + "file": "meos.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_start_value", + "file": "meos.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_value_at_timestamptz", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "text **", + "canonical": "struct varlena **" + } + ] + }, + { + "name": "ttext_value_n", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "text **", + "canonical": "struct varlena **" + } + ] + }, + { + "name": "ttext_values", + "file": "meos.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "float_degrees", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "value", + "cType": "double", + "canonical": "double" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temparr_round", + "file": "meos.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "Temporal **", + "canonical": "Temporal **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_round", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_scale_time", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_set_interp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "temporal_shift_scale_time", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_shift_time", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_to_tinstant", + "file": "meos.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_to_tsequence", + "file": "meos.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "temporal_to_tsequenceset", + "file": "meos.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tfloat_ceil", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_degrees", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tfloat_floor", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_radians", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_scale_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "width", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tfloat_shift_scale_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "double", + "canonical": "double" + }, + { + "name": "width", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tfloat_shift_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tint_scale_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbigint_scale_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "width", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "tint_shift_scale_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + }, + { + "name": "width", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbigint_shift_scale_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "int64", + "canonical": "long" + }, + { + "name": "width", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "tint_shift_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbigint_shift_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "temporal_append_tinstant", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_append_tsequence", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_delete_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_delete_tstzset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_delete_tstzspan", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_delete_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_insert", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_merge", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_merge_array", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temparr", + "cType": "Temporal **", + "canonical": "Temporal **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_update", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tbool_at_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tbool_minus_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_after_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_at_max", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_at_min", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_at_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "temporal_at_tstzset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "temporal_at_tstzspan", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "temporal_at_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "temporal_at_values", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "temporal_before_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_minus_max", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_minus_min", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_minus_timestamptz", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "temporal_minus_tstzset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "temporal_minus_tstzspan", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "temporal_minus_tstzspanset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "temporal_minus_values", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tfloat_at_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tfloat_minus_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tint_at_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tint_minus_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tnumber_at_span", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tnumber_at_spanset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tnumber_at_tbox", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tnumber_minus_span", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tnumber_minus_spanset", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tnumber_minus_tbox", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "ttext_at_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "ttext_minus_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "text *", + "canonical": "struct varlena *" + } + ] + }, + { + "name": "temporal_cmp", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_eq", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ], + "ownership": "caller", + "nullable": true, + "doc": "Returns the temporal equality between two temporal values.", + "meos": { + "temporalDim": "any", + "spatialDim": null, + "interpolation": false, + "subtype": "any" + } + }, + { + "name": "temporal_ge", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_gt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_le", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_lt", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_ne", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "always_eq_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "always_eq_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "always_eq_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "always_eq_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "always_ge_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ge_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ge_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ge_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ge_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "always_ge_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "always_ge_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ge_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "always_ge_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "always_gt_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_gt_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_gt_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_gt_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_gt_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "always_gt_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "always_gt_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_gt_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "always_gt_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "always_le_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_le_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_le_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_le_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_le_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "always_le_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "always_le_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_le_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "always_le_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "always_lt_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_lt_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_lt_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_lt_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_lt_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "always_lt_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "always_lt_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_lt_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "always_lt_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "always_ne_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "always_ne_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "always_ne_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "always_ne_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "always_ne_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "ever_eq_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ever_eq_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ever_eq_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ever_eq_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "ever_eq_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "ever_ge_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ge_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ge_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ge_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ge_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ever_ge_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ever_ge_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ge_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "ever_ge_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "ever_gt_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_gt_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_gt_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_gt_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_gt_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ever_gt_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ever_gt_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_gt_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "ever_gt_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "ever_le_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_le_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_le_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_le_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_le_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ever_le_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ever_le_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_le_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "ever_le_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "ever_lt_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_lt_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_lt_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_lt_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_lt_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ever_lt_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ever_lt_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_lt_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "ever_lt_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "ever_ne_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_int_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ever_ne_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_text_ttext", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ever_ne_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ever_ne_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "ever_ne_ttext_text", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "teq_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "teq_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "teq_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "teq_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tge_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tge_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tge_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tge_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tge_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tge_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tge_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tgt_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgt_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgt_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgt_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgt_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tgt_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tgt_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tle_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tle_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tle_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tle_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tle_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tle_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tle_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tlt_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tlt_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tlt_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tlt_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tlt_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tlt_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tlt_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tne_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tne_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tne_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tne_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "temporal_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_split_each_n_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "elem_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_split_n_spans", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "span_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_split_each_n_tboxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "elem_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_split_n_tboxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_tboxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "adjacent_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adjacent_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adjacent_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adjacent_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "adjacent_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "adjacent_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "adjacent_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adjacent_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "contained_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contains_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contains_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "contains_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overlaps_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overlaps_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overlaps_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "same_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "same_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "same_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "after_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "after_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "after_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "after_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "after_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "after_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "before_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "before_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "before_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "before_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "before_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "before_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "left_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "left_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "left_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "left_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overafter_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overafter_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overafter_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overafter_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overafter_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overafter_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbefore_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbefore_temporal_tstzspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overbefore_temporal_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbefore_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overbefore_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbefore_tstzspan_temporal", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overleft_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overleft_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overleft_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overleft_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overright_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overright_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overright_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overright_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "right_numspan_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "right_tbox_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "right_tnumber_numspan", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_tnumber_tbox", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "right_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tand_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tand_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tand_tbool_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_when_true", + "file": "meos.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnot_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tor_bool_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "b", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tor_tbool_bool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tor_tbool_tbool", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "add_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "add_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "add_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "add_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "add_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "add_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "add_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tnumber2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "div_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "div_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "div_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "div_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "div_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "div_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "div_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tnumber2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "mul_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "mul_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "mul_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "mul_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "mul_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "mul_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "mul_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tnumber2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "sub_float_tfloat", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "sub_int_tint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "sub_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "sub_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "sub_bigint_tbigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "i", + "cType": "int64", + "canonical": "long" + }, + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "sub_tbigint_bigint", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "sub_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tnumber1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tnumber2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_derivative", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_exp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_ln", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_log10", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_sin", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_cos", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_tan", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_abs", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_trend", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "float_angular_difference", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "degrees1", + "cType": "double", + "canonical": "double" + }, + { + "name": "degrees2", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tnumber_angular_difference", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_delta_value", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "textcat_text_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "textcat_ttext_text", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "textcat_ttext_ttext", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_initcap", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_upper", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_lower", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdistance_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdistance_tint_int", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tdistance_tnumber_tnumber", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_tboxfloat_tboxfloat", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "nad_tboxint_tboxint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "nad_tfloat_float", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "nad_tfloat_tfloat", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_tfloat_tbox", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "nad_tint_int", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "nad_tint_tbox", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "nad_tint_tint", + "file": "meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_tand_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_tand_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tbool_tor_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tbool_tor_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "temporal_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_tagg_finalfn", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "temporal_tcount_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_tcount_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tfloat_tmax_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_tmax_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tfloat_tmin_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_tmin_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tfloat_tsum_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tfloat_tsum_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tfloat_wmax_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tfloat_wmin_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tfloat_wsum_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "timestamptz_tcount_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tint_tmax_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_tmax_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tint_tmin_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_tmin_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tint_tsum_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tint_tsum_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tint_wmax_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tint_wmin_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tint_wsum_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tnumber_extent_transfn", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_tavg_finalfn", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tnumber_tavg_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumber_tavg_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tnumber_wavg_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tstzset_tcount_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzspan_tcount_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspanset_tcount_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "temporal_merge_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_merge_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "ttext_tmax_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_tmax_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "ttext_tmin_transfn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_tmin_combinefn", + "file": "meos.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "temporal_simplify_dp", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + }, + { + "name": "synchronized", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_simplify_max_dist", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + }, + { + "name": "synchronized", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_simplify_min_dist", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "temporal_simplify_min_tdelta", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "mint", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_tprecision", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "origin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "temporal_tsample", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "origin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "temporal_dyntimewarp_distance", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_dyntimewarp_path", + "file": "meos.h", + "returnType": { + "c": "Match *", + "canonical": "Match *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_frechet_distance", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_frechet_path", + "file": "meos.h", + "returnType": { + "c": "Match *", + "canonical": "Match *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_hausdorff_distance", + "file": "meos.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_ext_kalman_filter", + "file": "meos.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gate", + "cType": "double", + "canonical": "double" + }, + { + "name": "q", + "cType": "double", + "canonical": "double" + }, + { + "name": "variance", + "cType": "double", + "canonical": "double" + }, + { + "name": "to_drop", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_time_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "origin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_time_split", + "file": "meos.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "time_bins", + "cType": "TimestampTz **", + "canonical": "long **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloat_time_boxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloat_value_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloat_value_boxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloat_value_split", + "file": "meos.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "size", + "cType": "double", + "canonical": "double" + }, + { + "name": "origin", + "cType": "double", + "canonical": "double" + }, + { + "name": "bins", + "cType": "double **", + "canonical": "double **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloat_value_time_boxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloat_value_time_split", + "file": "meos.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "value_bins", + "cType": "double **", + "canonical": "double **" + }, + { + "name": "time_bins", + "cType": "TimestampTz **", + "canonical": "long **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloatbox_time_tiles", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloatbox_value_tiles", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tfloatbox_value_time_tiles", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "vsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "double", + "canonical": "double" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_time_boxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_value_bins", + "file": "meos.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_value_boxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_value_split", + "file": "meos.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "bins", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_value_time_boxes", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tint_value_time_split", + "file": "meos.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "size", + "cType": "int", + "canonical": "int" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "value_bins", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "time_bins", + "cType": "TimestampTz **", + "canonical": "long **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tintbox_time_tiles", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tintbox_value_tiles", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "xsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "xorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tintbox_value_time_tiles", + "file": "meos.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "xsize", + "cType": "int", + "canonical": "int" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "xorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "box3d_from_gbox", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "box3d_make", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "box3d_in", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "box3d_out", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "gbox_make", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hasm", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "mmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "mmax", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "gbox_in", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "gbox_out", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_as_ewkb", + "file": "meos_geo.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "endian", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "size", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "geo_as_ewkt", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_as_geojson", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "option", + "cType": "int", + "canonical": "int" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + }, + { + "name": "srs", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geo_as_hexewkb", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "endian", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geo_as_text", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_from_ewkb", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "wkb_size", + "cType": "size_t", + "canonical": "unsigned long" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geo_from_geojson", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geojson", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geo_from_text", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "wkt", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geo_out", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geog_from_hexewkb", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "wkt", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geog_in", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "typmod", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "geom_from_hexewkb", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "wkt", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geom_in", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "typmod", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "geo_copy", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geogpoint_make2d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geogpoint_make3dz", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "z", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geompoint_make2d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geompoint_make3dz", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "z", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geom_to_geog", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geog_to_geom", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geog", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_is_empty", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_is_unitary", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_typename", + "file": "meos_geo.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "type", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geog_area", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "use_spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geog_centroid", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "use_spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geog_length", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "use_spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geog_perimeter", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "use_spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geom_azimuth", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "geom_length", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_perimeter", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "line_numpoints", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "line_point_n", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_reverse", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_round", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_set_srid", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geo_srid", + "file": "meos_geo.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_transform", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "srid_to", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geo_transform_pipeline", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "pipeline", + "cType": "char *", + "canonical": "char *" + }, + { + "name": "srid_to", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "is_forward", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geo_collect_garray", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gsarr", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_makeline_garray", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gsarr", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_num_points", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_num_geos", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_geo_n", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_pointarr", + "file": "meos_geo.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_points", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_array_union", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gsarr", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geom_boundary", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_buffer", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "size", + "cType": "double", + "canonical": "double" + }, + { + "name": "params", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geom_centroid", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_convex_hull", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_difference2d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_intersection2d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_intersection2d_coll", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_min_bounding_radius", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "radius", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "geom_shortestline2d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_shortestline3d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_unary_union", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "prec", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "line_interpolate_point", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "distance_fraction", + "cType": "double", + "canonical": "double" + }, + { + "name": "repeat", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "line_locate_point", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "line_substring", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "from", + "cType": "double", + "canonical": "double" + }, + { + "name": "to", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geog_dwithin", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "g1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "g2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "tolerance", + "cType": "double", + "canonical": "double" + }, + { + "name": "use_spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geog_intersects", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "use_spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geom_contains", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_covers", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_disjoint2d", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_dwithin", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "tolerance", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geom_dwithin2d", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "tolerance", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geom_dwithin3d", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "tolerance", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geom_intersects", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_intersects2d", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_intersects3d", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_relate_pattern", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "patt", + "cType": "char *", + "canonical": "char *" + } + ] + }, + { + "name": "geom_touches", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_stboxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_split_each_n_stboxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "elem_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_split_n_stboxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "box_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geog_distance", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "g1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "g2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_distance2d", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_distance3d", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_equals", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_same", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geogset_in", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "geomset_in", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "spatialset_out", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spatialset_as_text", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spatialset_as_ewkt", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geoset_make", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_to_set", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geoset_end_value", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "geoset_start_value", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "geoset_value_n", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "geoset_values", + "file": "meos_geo.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "contained_geo_set", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_geo", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_union_transfn", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "intersection_geo_set", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "minus_geo_set", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "union_geo_set", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "spatialset_set_srid", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "spatialset_srid", + "file": "meos_geo.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "spatialset_transform", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "spatialset_transform_pipeline", + "file": "meos_geo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pipelinestr", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "is_forward", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "stbox_as_hexwkb", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "stbox_as_wkb", + "file": "meos_geo.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "stbox_from_hexwkb", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "stbox_from_wkb", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "stbox_in", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "stbox_out", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geo_timestamptz_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "geo_tstzspan_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "stbox_copy", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_make", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "hasx", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "geo_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "spatialset_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "stbox_to_box3d", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_to_gbox", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_to_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_to_tstzspan", + "file": "meos_geo.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "timestamptz_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tstzset_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tstzspan_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tstzspanset_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "stbox_area", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "stbox_hash", + "file": "meos_geo.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_hash_extended", + "file": "meos_geo.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "stbox_hast", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_hasx", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_hasz", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_isgeodetic", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_perimeter", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "spheroid", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "stbox_tmax", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "stbox_tmax_inc", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "stbox_tmin", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "stbox_tmin_inc", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "stbox_volume", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_xmax", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "stbox_xmin", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "stbox_ymax", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "stbox_ymin", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "stbox_zmax", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "stbox_zmin", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "stbox_expand_space", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "stbox_expand_time", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "stbox_get_space", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_quad_split", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "stbox_round", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "stbox_shift_scale_time", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "stboxarr_round", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "boxarr", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "stbox_set_srid", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "stbox_srid", + "file": "meos_geo.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_transform", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "stbox_transform_pipeline", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "pipelinestr", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "is_forward", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "adjacent_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "contained_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "contains_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overlaps_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "same_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "above_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "after_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "back_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "before_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "below_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "front_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "left_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overabove_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overafter_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overback_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overbefore_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overbelow_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overfront_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overleft_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overright_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "right_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "union_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intersection_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_cmp", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_eq", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_ge", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_gt", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_le", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_lt", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_ne", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "tspatial_out", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tgeogpoint_from_mfjson", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeogpoint_in", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeography_from_mfjson", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "mfjson", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeography_in", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeometry_from_mfjson", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeometry_in", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeompoint_from_mfjson", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeompoint_in", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tspatial_as_ewkt", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tspatial_as_text", + "file": "meos_geo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tgeo_from_base_temp", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeoinst_make", + "file": "meos_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tgeoseq_from_base_tstzset", + "file": "meos_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tgeoseq_from_base_tstzspan", + "file": "meos_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeoseqset_from_base_tstzspanset", + "file": "meos_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tpoint_from_base_temp", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpointinst_make", + "file": "meos_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tpointseq_from_base_tstzset", + "file": "meos_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tpointseq_from_base_tstzspan", + "file": "meos_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tpointseq_make_coords", + "file": "meos_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "xcoords", + "cType": "const double *", + "canonical": "const double *" + }, + { + "name": "ycoords", + "cType": "const double *", + "canonical": "const double *" + }, + { + "name": "zcoords", + "cType": "const double *", + "canonical": "const double *" + }, + { + "name": "times", + "cType": "const TimestampTz *", + "canonical": "const long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tpointseqset_from_base_tstzspanset", + "file": "meos_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "box3d_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "gbox_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geomeas_to_tpoint", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tgeogpoint_to_tgeography", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeography_to_tgeogpoint", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeography_to_tgeometry", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeometry_to_tgeography", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeometry_to_tgeompoint", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeompoint_to_tgeometry", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_as_mvtgeom", + "file": "meos_geo.h", + "returnType": { + "c": "MvtGeom", + "canonical": "struct MvtGeom" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "bounds", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "extent", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "buffer", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "clip_geom", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tpoint_tfloat_to_geomeas", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "tpoint", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "measure", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "segmentize", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "tspatial_to_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "bearing_point_point", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "bearing_tpoint_point", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "bearing_tpoint_tpoint", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeo_centroid", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeo_convex_hull", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeo_end_value", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeo_start_value", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeo_traversed_area", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_value_at_timestamptz", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "tgeo_value_n", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "tgeo_values", + "file": "meos_geo.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpoint_angular_difference", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_azimuth", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_cumulative_length", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_direction", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpoint_get_x", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_get_y", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_get_z", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_is_simple", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_length", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_speed", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ], + "ownership": "caller", + "nullable": true, + "doc": "Computes the instantaneous speed of a temporal point.", + "meos": { + "temporalDim": "sequence", + "spatialDim": null, + "interpolation": true, + "subtype": "TPoint" + } + }, + { + "name": "tpoint_trajectory", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tpoint_twcentroid", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeo_affine", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "a", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tgeo_scale", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "scale", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpoint_make_simple", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatial_srid", + "file": "meos_geo.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tspatial_set_srid", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tspatial_transform", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tspatial_transform_pipeline", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pipelinestr", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "is_forward", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_at_geom", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tgeo_at_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_at_value", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeo_minus_geom", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tgeo_minus_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_minus_value", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpoint_at_elevation", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tpoint_at_geom", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpoint_at_value", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpoint_minus_elevation", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tpoint_minus_geom", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpoint_minus_value", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "always_eq_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_eq_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_ne_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ever_eq_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ever_ne_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tne_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tgeo_stboxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeo_space_boxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeo_space_time_boxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeo_split_each_n_stboxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "elem_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeo_split_n_stboxes", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "adjacent_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adjacent_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "adjacent_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "contained_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "contains_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overlaps_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overlaps_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "same_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "above_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "above_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "above_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "after_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "after_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "after_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "back_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "back_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "back_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "before_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "before_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "before_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "below_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "below_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "below_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "front_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "front_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "front_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "left_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "left_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "left_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overabove_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overabove_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overabove_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overafter_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overafter_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overafter_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overback_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overback_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overback_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbefore_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbefore_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overbefore_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbelow_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overbelow_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overbelow_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overfront_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overfront_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overfront_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overleft_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overleft_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overleft_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overright_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "overright_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overright_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "right_stbox_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "right_tspatial_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "right_tspatial_tspatial", + "file": "meos_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acontains_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acontains_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "acontains_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acovers_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acovers_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "acovers_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adisjoint_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "adisjoint_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adwithin_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adwithin_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "aintersects_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "aintersects_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "atouches_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "atouches_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "atouches_tpoint_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "econtains_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "econtains_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "econtains_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ecovers_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ecovers_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ecovers_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "edisjoint_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "edisjoint_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "edwithin_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "edwithin_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "eintersects_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "eintersects_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "etouches_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "etouches_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "etouches_tpoint_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcontains_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcontains_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcontains_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcovers_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcovers_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcovers_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdisjoint_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdisjoint_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdisjoint_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdwithin_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdwithin_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdwithin_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tintersects_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tintersects_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tintersects_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttouches_geo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttouches_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ttouches_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdistance_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdistance_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_stbox_geo", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_stbox_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_tgeo_stbox", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nai_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nai_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "shortestline_tgeo_geo", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "shortestline_tgeo_tgeo", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpoint_tcentroid_finalfn", + "file": "meos_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "tpoint_tcentroid_transfn", + "file": "meos_geo.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "Temporal *", + "canonical": "Temporal *" + } + ] + }, + { + "name": "tspatial_extent_transfn", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "stbox_get_space_tile", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "point", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "stbox_get_space_time_tile", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "point", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "stbox_get_time_tile", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "stbox_space_tiles", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "bounds", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "stbox_space_time_tiles", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "bounds", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "stbox_time_tiles", + "file": "meos_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "bounds", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeo_space_split", + "file": "meos_geo.h", + "returnType": { + "c": "SpaceSplit", + "canonical": "struct SpaceSplit" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_space_time_split", + "file": "meos_geo.h", + "returnType": { + "c": "SpaceTimeSplit", + "canonical": "struct SpaceTimeSplit" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geo_cluster_kmeans", + "file": "meos_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geoms", + "cType": "const int **", + "canonical": "const int **" + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "k", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_cluster_dbscan", + "file": "meos_geo.h", + "returnType": { + "c": "uint32_t *", + "canonical": "unsigned int *" + }, + "params": [ + { + "name": "geoms", + "cType": "const int **", + "canonical": "const int **" + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "tolerance", + "cType": "double", + "canonical": "double" + }, + { + "name": "minpoints", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_cluster_intersecting", + "file": "meos_geo.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "geoms", + "cType": "const int **", + "canonical": "const int **" + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_cluster_within", + "file": "meos_geo.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "geoms", + "cType": "const int **", + "canonical": "const int **" + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "tolerance", + "cType": "double", + "canonical": "double" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "cbuffer_as_ewkt", + "file": "meos_cbuffer.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_as_hexwkb", + "file": "meos_cbuffer.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "cbuffer_as_text", + "file": "meos_cbuffer.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_as_wkb", + "file": "meos_cbuffer.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "cbuffer_from_hexwkb", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "cbuffer_from_wkb", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "cbuffer_in", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "cbuffer_out", + "file": "meos_cbuffer.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_copy", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_make", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "point", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "radius", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "cbuffer_to_geom", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_to_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbufferarr_to_geom", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "cbarr", + "cType": "const Cbuffer **", + "canonical": "const struct Cbuffer **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "geom_to_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "cbuffer_hash", + "file": "meos_cbuffer.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_hash_extended", + "file": "meos_cbuffer.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "cbuffer_point", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_radius", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_round", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbufferarr_round", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer **", + "canonical": "struct Cbuffer **" + }, + "params": [ + { + "name": "cbarr", + "cType": "const Cbuffer **", + "canonical": "const struct Cbuffer **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_set_srid", + "file": "meos_cbuffer.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "cb", + "cType": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_srid", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_transform", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_transform_pipeline", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "pipelinestr", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "is_forward", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contains_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "covers_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "disjoint_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "dwithin_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "intersects_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "touches_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_tstzspan_to_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "cbuffer_timestamptz_to_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "distance_cbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "distance_cbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "distance_cbuffer_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_cbuffer_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "cbuffer_cmp", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_eq", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_ge", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_gt", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_le", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_lt", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_ne", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_nsame", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_same", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbufferset_in", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "cbufferset_out", + "file": "meos_cbuffer.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbufferset_make", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "Cbuffer **", + "canonical": "struct Cbuffer **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "cbuffer_to_set", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbufferset_end_value", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "cbufferset_start_value", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "cbufferset_value_n", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Cbuffer **", + "canonical": "struct Cbuffer **" + } + ] + }, + { + "name": "cbufferset_values", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer **", + "canonical": "struct Cbuffer **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "cbuffer_union_transfn", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "contained_cbuffer_set", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "cb", + "cType": "Cbuffer *", + "canonical": "struct Cbuffer *" + } + ] + }, + { + "name": "intersection_cbuffer_set", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "minus_cbuffer_set", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "union_cbuffer_set", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tcbuffer_in", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tcbuffer_from_mfjson", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "mfjson", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tcbufferinst_make", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tcbuffer_make", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tpoint", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tfloat", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_from_base_temp", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbufferseq_from_base_tstzset", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tcbufferseq_from_base_tstzspan", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tcbufferseqset_from_base_tstzspanset", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tcbuffer_end_value", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_points", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_radius", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_traversed_area", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcbuffer_convex_hull", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_start_value", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_value_at_timestamptz", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "Cbuffer **", + "canonical": "struct Cbuffer **" + } + ] + }, + { + "name": "tcbuffer_value_n", + "file": "meos_cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Cbuffer **", + "canonical": "struct Cbuffer **" + } + ] + }, + { + "name": "tcbuffer_values", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Cbuffer **", + "canonical": "struct Cbuffer **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tcbuffer_to_tfloat", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_to_tgeompoint", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tgeometry_to_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffer_expand", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tcbuffer_at_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tcbuffer_at_geom", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcbuffer_at_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcbuffer_minus_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tcbuffer_minus_geom", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcbuffer_minus_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdistance_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tdistance_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdistance_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "nad_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_tcbuffer_stbox", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "mindistance_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "threshold", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "nai_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "nai_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nai_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "shortestline_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "shortestline_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "shortestline_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "always_eq_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "always_ne_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "ever_eq_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "ever_ne_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tne_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "acontains_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acontains_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acontains_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "acontains_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "acovers_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acovers_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acovers_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "acovers_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "acovers_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adisjoint_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "adisjoint_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "adisjoint_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adwithin_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adwithin_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adwithin_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "aintersects_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "aintersects_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "aintersects_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "atouches_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "atouches_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "atouches_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "econtains_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "econtains_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "econtains_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ecovers_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ecovers_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ecovers_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "ecovers_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ecovers_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "edisjoint_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "edisjoint_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "edwithin_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "edwithin_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "edwithin_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "eintersects_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "eintersects_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "eintersects_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "etouches_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "etouches_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "etouches_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcontains_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcontains_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcontains_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcontains_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tcontains_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcovers_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcovers_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcovers_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tcovers_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tcovers_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdwithin_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdwithin_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdwithin_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdwithin_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tdisjoint_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdisjoint_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdisjoint_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdisjoint_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tdisjoint_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tintersects_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tintersects_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tintersects_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tintersects_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "tintersects_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttouches_geo_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttouches_tcbuffer_geo", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ttouches_cbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttouches_tcbuffer_cbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "ttouches_tcbuffer_tcbuffer", + "file": "meos_cbuffer.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_cbuffer_cbuffer", + "file": "cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "ensure_valid_cbuffer_geo", + "file": "cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_cbuffer_stbox", + "file": "cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_cbufferset_cbuffer", + "file": "cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_collinear", + "file": "cbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cbuf3", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "cbuffersegm_interpolate", + "file": "cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "start", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "end", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ratio", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "cbuffersegm_locate", + "file": "cbuffer.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "start", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "end", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "value", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_parse", + "file": "cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "cbuffer_wkt_out", + "file": "cbuffer.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "extended", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "cbuffer_point_p", + "file": "cbuffer.h", + "returnType": { + "c": "const int *", + "canonical": "const int *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "datum_cbuffer_round", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "buffer", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "cbuffer_transf_pj", + "file": "cbuffer.h", + "returnType": { + "c": "Cbuffer *", + "canonical": "struct Cbuffer *" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "srid_to", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "pj", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "cbuffer_distance", + "file": "cbuffer.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "datum_cbuffer_distance", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "cbuffersegm_distance_turnpt", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "end1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "start2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "end2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "cbuffer_contains", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_covers", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_disjoint", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_intersects", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "cbuffer_dwithin", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "cbuffer_touches", + "file": "cbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb1", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "cb2", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "datum_cbuffer_contains", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_cbuffer_covers", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_cbuffer_disjoint", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_cbuffer_intersects", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_cbuffer_dwithin", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_cbuffer_touches", + "file": "cbuffer.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cb1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cb2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "temptype_subtype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "subtype", + "cType": "tempSubtype", + "canonical": "tempSubtype" + } + ] + }, + { + "name": "temptype_subtype_all", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "subtype", + "cType": "tempSubtype", + "canonical": "tempSubtype" + } + ] + }, + { + "name": "tempsubtype_name", + "file": "meos_catalog.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "subtype", + "cType": "tempSubtype", + "canonical": "tempSubtype" + } + ] + }, + { + "name": "tempsubtype_from_string", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "subtype", + "cType": "int16 *", + "canonical": "short *" + } + ] + }, + { + "name": "meosoper_name", + "file": "meos_catalog.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "oper", + "cType": "MeosOper", + "canonical": "MeosOper" + } + ] + }, + { + "name": "meosoper_from_string", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosOper", + "canonical": "MeosOper" + }, + "params": [ + { + "name": "name", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "interptype_name", + "file": "meos_catalog.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "interptype_from_string", + "file": "meos_catalog.h", + "returnType": { + "c": "interpType", + "canonical": "interpType" + }, + "params": [ + { + "name": "interp_str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meos_typeof_hexwkb", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meostype_name", + "file": "meos_catalog.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temptype_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "settype_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spantype_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spantype_spansettype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spansettype_spantype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "basetype_spantype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "basetype_settype", + "file": "meos_catalog.h", + "returnType": { + "c": "MeosType", + "canonical": "MeosType" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tnumber_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "geo_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "meos_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "alphanum_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "alphanum_temptype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "time_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "set_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "set_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "numset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_numset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "timeset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "set_spantype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_set_spantype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "alphanumset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "settype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "geoset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_geoset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spatialset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_spatialset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_canon_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "type_span_bbox", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_tbox_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_span_tbox_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "numspan_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "numspan_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_numspan_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "timespan_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "timespan_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spanset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "timespanset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_timespanset_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temptype_supports_linear", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "basetype_byvalue", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "basetype_varlength", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "meostype_length", + "file": "meos_catalog.h", + "returnType": { + "c": "int16", + "canonical": "short" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "talphanum_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "talpha_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tnumber_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tnumber_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tnumber_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tnumber_spantype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spatial_basetype", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tspatial_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tspatial_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tpoint_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tpoint_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tgeo_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tgeo_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tgeo_type_all", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tgeo_type_all", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tgeometry_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tgeometry_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tgeodetic_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tgeodetic_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_tnumber_tpoint_type", + "file": "meos_catalog.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "gsl_get_generation_rng", + "file": "meos_internal.h", + "returnType": { + "c": "gsl_rng *", + "canonical": "gsl_rng *" + }, + "params": [] + }, + { + "name": "gsl_get_aggregation_rng", + "file": "meos_internal.h", + "returnType": { + "c": "gsl_rng *", + "canonical": "gsl_rng *" + }, + "params": [] + }, + { + "name": "datum_ceil", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_degrees", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "normalize", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_float_round", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_floor", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_hash", + "file": "meos_internal.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_hash_extended", + "file": "meos_internal.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_radians", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "floatspan_round_set", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "set_in", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "set_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "span_in", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spanset_in", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spanset_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "set_make", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "order", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_make_exp", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "order", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_make_free", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "order", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "span_make", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "lower", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "upper", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_set", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "lower", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "upper", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "spanset_make_exp", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "spans", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "order", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "spanset_make_free", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "spans", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "order", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_span", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "value_set_span", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "value_set", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "value_span", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "numspan_width", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "numspanset_width", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_end_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_mem_size", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_set_subspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "minidx", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxidx", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "set_set_span", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "set_start_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_value_n", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "set_vals", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_values", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "spanset_lower", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_mem_size", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_sps", + "file": "meos_internal.h", + "returnType": { + "c": "const Span **", + "canonical": "const Span **" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_upper", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "datespan_set_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "bigintspan_set_floatspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "bigintspan_set_intspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "floatspan_set_bigintspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "floatspan_set_intspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "intspan_set_bigintspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "intspan_set_floatspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "numset_shift_scale", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "numspan_expand", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "numspan_shift_scale", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "numspanset_shift_scale", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "set_compact", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_expand", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "spanset_compact", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tbox_expand_value", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetyp", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "textcat_textset_text_common", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tstzspan_set_datespan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "adjacent_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "adjacent_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "adjacent_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contained_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contained_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contained_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "contains_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "contains_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "contains_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ovadj_span_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "left_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "left_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "left_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "left_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "lfnadj_span_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "overleft_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "overleft_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "overleft_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overleft_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overleft_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "overright_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "overright_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "overright_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "overright_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "overright_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overright_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "right_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "right_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "right_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "right_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "bbox_type", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "bboxtype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "bbox_get_size", + "file": "meos_internal.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "bboxtype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "bbox_max_dims", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "bboxtype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_bbox_eq", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "box2", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_bbox_cmp", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "box2", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "bbox_union_span_span", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "inter_span_span", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "intersection_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "intersection_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "intersection_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "intersection_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "intersection_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "mi_span_span", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "minus_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "minus_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "minus_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "minus_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "minus_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "union_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "union_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "union_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "union_value_set", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_value_span", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "union_value_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "distance_set_set", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "distance_set_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "distance_span_span", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_span_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "distance_spanset_span", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_spanset_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "distance_spanset_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "distance_value_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spanbase_extent_transfn", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "state", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "value_union_transfn", + "file": "meos_internal.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "number_tstzspan_to_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "number_timestamptz_to_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tbox_set", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "p", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "float_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "int_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "number_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "number_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "numset_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "numspan_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "timestamptz_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tstzset_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tstzspan_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tbox_shift_scale_value", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tbox_expand", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "inter_tbox_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "result", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tboolinst_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tboolinst_in", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tboolseq_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tboolseq_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tboolseqset_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tboolseqset_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "temporal_in", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temparr_out", + "file": "meos_internal.h", + "returnType": { + "c": "char **", + "canonical": "char **" + }, + "params": [ + { + "name": "temparr", + "cType": "Temporal **", + "canonical": "Temporal **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tfloatinst_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tfloatinst_in", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tfloatseq_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tfloatseq_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tfloatseqset_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tfloatseqset_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tinstant_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "spatial", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tinstant_in", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tinstant_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbigintinst_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tbigintinst_in", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tbigintseq_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tbigintseqset_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tbigintseqset_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tintinst_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tintinst_in", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tintseq_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tintseq_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tintseqset_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tintseqset_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tsequence_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "spatial", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequence_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequence_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequenceset_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "spatial", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequenceset_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequenceset_out", + "file": "meos_internal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ttextinst_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "ttextinst_in", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "ttextseq_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "ttextseq_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "ttextseqset_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "ttextseqset_in", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "temporal_from_mfjson", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "mfjson", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_from_base_temp", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tinstant_copy", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_make", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tinstant_make_free", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tsequence_copy", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_from_base_temp", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_from_base_tstzset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tsequence_from_base_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequence_make_exp", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_make_free", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_copy", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tseqsetarr_to_tseqset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seqsets", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "totalseqs", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequenceset_from_base_temp", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_from_base_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequenceset_make_exp", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_make_free", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_set_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "tinstant_set_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "tnumber_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tnumberinst_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tnumberseq_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tnumberseqset_set_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tsequence_set_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "tsequenceset_set_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "temporal_end_inst", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_end_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_inst_n", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_insts_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant **", + "canonical": "const TInstant **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_max_inst_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_max_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_mem_size", + "file": "meos_internal.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_min_inst_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_min_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_sequences_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TSequence **", + "canonical": "const TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_set_bbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "temporal_start_inst", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_start_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "temporal_values_p", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_value_n", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "temporal_values", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tinstant_hash", + "file": "meos_internal.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_insts", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant **", + "canonical": "const TInstant **" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tinstant_set_bbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "tinstant_time", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_timestamps", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz *", + "canonical": "long *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tinstant_value_p", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_value", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_value_at_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tinstant_values_p", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_set_span", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "span", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "tnumberinst_valuespans", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnumberseq_avg_val", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseq_valuespans", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseqset_avg_val", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tnumberseqset_valuespans", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequence_duration", + "file": "meos_internal.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_end_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_hash", + "file": "meos_internal.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_insts_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant **", + "canonical": "const TInstant **" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequence_max_inst_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_max_val", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_min_inst_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_min_val", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_segments", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequence_seqs", + "file": "meos_internal.h", + "returnType": { + "c": "const TSequence **", + "canonical": "const TSequence **" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequence_start_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_time", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_timestamps", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz *", + "canonical": "long *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequence_value_at_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tsequence_values_p", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequenceset_duration", + "file": "meos_internal.h", + "returnType": { + "c": "Interval *", + "canonical": "Interval *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "boundspan", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_end_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_hash", + "file": "meos_internal.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_inst_n", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequenceset_insts_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant **", + "canonical": "const TInstant **" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequenceset_max_inst_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_max_val", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_min_inst_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TInstant *", + "canonical": "const TInstant *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_min_val", + "file": "meos_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_num_instants", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_num_timestamps", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_segments", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequenceset_sequences_p", + "file": "meos_internal.h", + "returnType": { + "c": "const TSequence **", + "canonical": "const TSequence **" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_start_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_time", + "file": "meos_internal.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_timestamptz_n", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tsequenceset_timestamps", + "file": "meos_internal.h", + "returnType": { + "c": "TimestampTz *", + "canonical": "long *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequenceset_value_at_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tsequenceset_value_n", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tsequenceset_value_n_p", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tsequenceset_values_p", + "file": "meos_internal.h", + "returnType": { + "c": "Datum *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_restart", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "temp", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "temporal_tsequence", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "temporal_tsequenceset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tinstant_shift_time", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interv", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tinstant_to_tsequence", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tinstant_to_tsequence_free", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "inst", + "cType": "TInstant *", + "canonical": "TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tinstant_to_tsequenceset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tnumber_shift_scale_value", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberinst_shift_value", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tnumberseq_shift_scale_value", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseqset_shift_scale_value", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_restart", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequence_set_interp", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequence_shift_scale_time", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tsequence_subseq", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "from", + "cType": "int", + "canonical": "int" + }, + { + "name": "to", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_to_tinstant", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_to_tsequenceset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_to_tsequenceset_free", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + } + ] + }, + { + "name": "tsequence_to_tsequenceset_interp", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequenceset_restart", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequenceset_set_interp", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequenceset_shift_scale_time", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "start", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "tsequenceset_to_discrete", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_to_linear", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_to_step", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_to_tinstant", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_to_tsequence", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tinstant_merge", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_merge_array", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequence_append_tinstant", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_append_tsequence", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_delete_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_delete_tstzset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_delete_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_delete_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_insert", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_merge", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_merge_array", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequenceset_append_tinstant", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_append_tsequence", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_delete_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tsequenceset_delete_tstzset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tsequenceset_delete_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tsequenceset_delete_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ps", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tsequenceset_insert", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss1", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ss2", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_merge", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss1", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ss2", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_merge_array", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seqsets", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequence_expand_bbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tsequence_set_bbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "tsequenceset_expand_bbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequenceset_set_bbox", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "tcontseq_after_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcontseq_before_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcontseq_restrict_minmax", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "min", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_after_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_before_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_restrict_minmax", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "min", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_bbox_restrict_set", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "temporal_restrict_minmax", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "min", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_restrict_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_restrict_tstzset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_restrict_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_restrict_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_restrict_value", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_restrict_values", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_value_at_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tinstant_after_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_before_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "period", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_tstzset", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_value", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_values", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumber_restrict_span", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumber_restrict_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberinst_restrict_span", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberinst_restrict_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseqset_restrict_span", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseqset_restrict_spanset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "spanset", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_at_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tsequence_restrict_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_restrict_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_after_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_before_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_minmax", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "min", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_tstzspan", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_tstzspanset", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ps", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_timestamptz", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_tstzset", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_value", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_restrict_values", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_cmp", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_eq", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tsequence_cmp", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_eq", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequenceset_cmp", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ss1", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ss2", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tsequenceset_eq", + "file": "meos_internal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ss2", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "always_eq_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_ne_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_ge_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ge_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_gt_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_gt_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_le_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_le_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_lt_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_lt_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_eq_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_ne_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_ge_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ge_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_gt_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_gt_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_le_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_le_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_lt_base_temporal", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_lt_temporal_base", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tnumberinst_abs", + "file": "meos_internal.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnumberinst_distance", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnumberseq_abs", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseq_angular_difference", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseq_delta_value", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseqset_abs", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tnumberseqset_angular_difference", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tnumberseqset_delta_value", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tdistance_tnumber_number", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "nad_tbox_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "nad_tnumber_number", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "nad_tnumber_tbox", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "nad_tnumber_tnumber", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnumberseq_integral", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseq_twavg", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnumberseqset_integral", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tnumberseqset_twavg", + "file": "meos_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "temporal_compact", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tsequence_compact", + "file": "meos_internal.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequenceset_compact", + "file": "meos_internal.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "temporal_skiplist_make", + "file": "meos_internal.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [] + }, + { + "name": "skiplist_make", + "file": "meos_internal.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "key_size", + "cType": "size_t", + "canonical": "unsigned long" + }, + { + "name": "value_size", + "cType": "size_t", + "canonical": "unsigned long" + }, + { + "name": "comp_fn", + "cType": "int (*)(void *, void *)", + "canonical": "int (*)(void *, void *)" + }, + { + "name": "merge_fn", + "cType": "void *(*)(void *, void *)", + "canonical": "void *(*)(void *, void *)" + } + ] + }, + { + "name": "skiplist_search", + "file": "meos_internal.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "key", + "cType": "void *", + "canonical": "void *" + }, + { + "name": "value", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "skiplist_free", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "skiplist_splice", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "keys", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "values", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "sktype", + "cType": "SkipListType", + "canonical": "SkipListType" + } + ] + }, + { + "name": "temporal_skiplist_splice", + "file": "meos_internal.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "values", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "skiplist_values", + "file": "meos_internal.h", + "returnType": { + "c": "void **", + "canonical": "void **" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "skiplist_keys_values", + "file": "meos_internal.h", + "returnType": { + "c": "void **", + "canonical": "void **" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "values", + "cType": "void **", + "canonical": "void **" + } + ] + }, + { + "name": "temporal_app_tinst_transfn", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "state", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_app_tseq_transfn", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "state", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "span_bins", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "origin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "spanset_bins", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "origin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_value_bins", + "file": "meos_internal.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "origin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_value_time_boxes", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_value_split", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "vorigin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "bins", + "cType": "Datum **", + "canonical": "unsigned long **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tbox_get_value_time_tile", + "file": "meos_internal.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "vsize", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tnumber_value_time_split", + "file": "meos_internal.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "value_bins", + "cType": "Datum **", + "canonical": "unsigned long **" + }, + { + "name": "time_bins", + "cType": "TimestampTz **", + "canonical": "long **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "double2_out", + "file": "doublen.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "d", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "double2_set", + "file": "doublen.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "double", + "canonical": "double" + }, + { + "name": "b", + "cType": "double", + "canonical": "double" + }, + { + "name": "result", + "cType": "double2 *", + "canonical": "double2 *" + } + ] + }, + { + "name": "double2_add", + "file": "doublen.h", + "returnType": { + "c": "double2 *", + "canonical": "double2 *" + }, + "params": [ + { + "name": "d1", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "d2", + "cType": "const double2 *", + "canonical": "const double2 *" + } + ] + }, + { + "name": "double2_eq", + "file": "doublen.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d1", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "d2", + "cType": "const double2 *", + "canonical": "const double2 *" + } + ] + }, + { + "name": "double3_out", + "file": "doublen.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "d", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "double3_set", + "file": "doublen.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "double", + "canonical": "double" + }, + { + "name": "b", + "cType": "double", + "canonical": "double" + }, + { + "name": "c", + "cType": "double", + "canonical": "double" + }, + { + "name": "result", + "cType": "double3 *", + "canonical": "double3 *" + } + ] + }, + { + "name": "double3_add", + "file": "doublen.h", + "returnType": { + "c": "double3 *", + "canonical": "double3 *" + }, + "params": [ + { + "name": "d1", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "d2", + "cType": "const double3 *", + "canonical": "const double3 *" + } + ] + }, + { + "name": "double3_eq", + "file": "doublen.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d1", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "d2", + "cType": "const double3 *", + "canonical": "const double3 *" + } + ] + }, + { + "name": "double4_out", + "file": "doublen.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "d", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "double4_set", + "file": "doublen.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "double", + "canonical": "double" + }, + { + "name": "b", + "cType": "double", + "canonical": "double" + }, + { + "name": "c", + "cType": "double", + "canonical": "double" + }, + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "result", + "cType": "double4 *", + "canonical": "double4 *" + } + ] + }, + { + "name": "double4_add", + "file": "doublen.h", + "returnType": { + "c": "double4 *", + "canonical": "double4 *" + }, + "params": [ + { + "name": "d1", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "d2", + "cType": "const double4 *", + "canonical": "const double4 *" + } + ] + }, + { + "name": "double4_eq", + "file": "doublen.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d1", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "d2", + "cType": "const double4 *", + "canonical": "const double4 *" + } + ] + }, + { + "name": "double2_collinear", + "file": "doublen.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "x1", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "x2", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "x3", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "double3_collinear", + "file": "doublen.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "x1", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "x2", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "x3", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "double4_collinear", + "file": "doublen.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "x1", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "x2", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "x3", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "double2segm_interpolate", + "file": "doublen.h", + "returnType": { + "c": "double2 *", + "canonical": "double2 *" + }, + "params": [ + { + "name": "start", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "end", + "cType": "const double2 *", + "canonical": "const double2 *" + }, + { + "name": "ratio", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "double3segm_interpolate", + "file": "doublen.h", + "returnType": { + "c": "double3 *", + "canonical": "double3 *" + }, + "params": [ + { + "name": "start", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "end", + "cType": "const double3 *", + "canonical": "const double3 *" + }, + { + "name": "ratio", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "double4segm_interpolate", + "file": "doublen.h", + "returnType": { + "c": "double4 *", + "canonical": "double4 *" + }, + "params": [ + { + "name": "start", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "end", + "cType": "const double4 *", + "canonical": "const double4 *" + }, + { + "name": "ratio", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "pg_atoi", + "file": "temporal.h", + "returnType": { + "c": "int32", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "size", + "cType": "int", + "canonical": "int" + }, + { + "name": "c", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ensure_has_X", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_has_Z", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_has_T", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_has_not_Z", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_not_null", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ptr", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "ensure_one_not_null", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ptr1", + "cType": "void *", + "canonical": "void *" + }, + { + "name": "ptr2", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "ensure_one_true", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ensure_valid_interp", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "ensure_continuous", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_same_interp", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_same_continuous_interp", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_linear_interp", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_nonlinear_interp", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_common_dimension", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_temporal_isof_type", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_temporal_isof_basetype", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_temporal_isof_subtype", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "type", + "cType": "tempSubtype", + "canonical": "tempSubtype" + } + ] + }, + { + "name": "ensure_same_temporal_type", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_tnumber_numspan", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "ensure_valid_tnumber_numspanset", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "ensure_valid_tnumber_tbox", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "ensure_valid_temporal_set", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "ensure_valid_temporal_temporal", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_tnumber_tnumber", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_not_negative", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ensure_positive", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "not_negative_datum", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_not_negative_datum", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "positive_datum", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_positive_datum", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_valid_day_duration", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "positive_duration", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "ensure_positive_duration", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "temporal_bbox_ptr", + "file": "temporal.h", + "returnType": { + "c": "void *", + "canonical": "void *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "intersection_temporal_temporal", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "mode", + "cType": "SyncMode", + "canonical": "SyncMode" + }, + { + "name": "inter1", + "cType": "Temporal **", + "canonical": "Temporal **" + }, + { + "name": "inter2", + "cType": "Temporal **", + "canonical": "Temporal **" + } + ] + }, + { + "name": "mobilitydb_version", + "file": "temporal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [] + }, + { + "name": "mobilitydb_full_version", + "file": "temporal.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [] + }, + { + "name": "round_fn", + "file": "temporal.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "temporal_bbox_restrict_value", + "file": "temporal.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ensure_valid_tcbuffer_cbuffer", + "file": "tcbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + } + ] + }, + { + "name": "ensure_valid_tcbuffer_geo", + "file": "tcbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tcbuffer_stbox", + "file": "tcbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_tcbuffer_tcbuffer", + "file": "tcbuffer.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcbuffersegm_intersection_value", + "file": "tcbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tcbuffersegm_intersection", + "file": "tcbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tcbuffersegm_dwithin_turnpt", + "file": "tcbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tcbuffersegm_tdwithin_turnpt", + "file": "tcbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tcbuffersegm_distance_turnpt", + "file": "tcbuffer.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "cbuffer_set_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "cbufferarr_set_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "cbuffer_timestamptz_set_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "cbuffer_tstzspan_set_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tcbufferinst_set_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tcbufferinstarr_set_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tcbufferseq_expand_stbox", + "file": "tcbuffer_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tcbufferinst_traversed_area", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tcbufferseq_traversed_area", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcbufferseqset_traversed_area", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcbuffersegm_traversed_area", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tcbuffer_restrict_cbuffer", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcbuffer_restrict_stbox", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcbuffer_restrict_geom", + "file": "tcbuffer_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_geo_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_tcbuffer_geo", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_tcbuffer_cbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_cbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_geo_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_tcbuffer_geo", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_tcbuffer_cbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_cbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_tcbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_tcbuffer_geo", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_geo_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_tcbuffer_cbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_cbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_tcbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_tcbuffer_geo", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_geo_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_tcbuffer_cbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_cbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_tcbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_tcbuffer_geo", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_geo_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_tcbuffer_cbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_cbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_tcbuffer_tcbuffer", + "file": "tcbuffer_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinterrel_tcbuffer_cbuffer", + "file": "tcbuffer_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cb", + "cType": "const Cbuffer *", + "canonical": "const struct Cbuffer *" + }, + { + "name": "tinter", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinterrel_tcbuffer_geo", + "file": "tcbuffer_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "tinter", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "clipper2_clip_poly_poly", + "file": "clip_clipper2.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "subj", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "clip", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "op", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "clipper2_traj_poly_periods", + "file": "clip_clipper2.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "out_count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "clip_poly_poly", + "file": "geo_poly_clip.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "subj", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "clip", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "operation", + "cType": "ClipOper", + "canonical": "ClipOper" + } + ] + }, + { + "name": "lwproj_lookup", + "file": "meos_transform.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "srid_from", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "srid_to", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "pj", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "spheroid_init_from_srid", + "file": "meos_transform.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "s", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "srid_check_latlong", + "file": "meos_transform.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "srid_is_latlong", + "file": "meos_transform.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geom_serialize", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "lwgeom", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geog_serialize", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "lwgeom", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "meos_postgis_valid_typmod", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "typmod", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geo_as_wkt", + "file": "postgis_funcs.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + }, + { + "name": "extended", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "box2d_to_lwgeom", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "box3d_to_lwgeom", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "MEOS_POSTGIS2GEOS", + "file": "postgis_funcs.h", + "returnType": { + "c": "GEOSGeometry *", + "canonical": "struct GEOSGeom_t *" + }, + "params": [ + { + "name": "pglwgeom", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "MEOS_GEOS2POSTGIS", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "GEOSGeom", + "canonical": "struct GEOSGeom_t *" + }, + { + "name": "want3d", + "cType": "char", + "canonical": "char" + } + ] + }, + { + "name": "geom_spatialrel", + "file": "postgis_funcs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "rel", + "cType": "spatialRel", + "canonical": "spatialRel" + } + ] + }, + { + "name": "lwgeom_line_interpolate_point", + "file": "postgis_funcs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "fraction", + "cType": "double", + "canonical": "double" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "repeat", + "cType": "char", + "canonical": "char" + } + ] + }, + { + "name": "point_get_coords", + "file": "stbox.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "point", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "x", + "cType": "double *", + "canonical": "double *" + }, + { + "name": "y", + "cType": "double *", + "canonical": "double *" + }, + { + "name": "z", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tstzset_stbox_slice", + "file": "stbox.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "tsdatum", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tstzspanset_stbox_slice", + "file": "stbox.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "psdatum", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "stbox_index_leaf_consistent", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "stbox_gist_inner_consistent", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "stbox_index_recheck", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "stboxnode_copy", + "file": "stbox_index.h", + "returnType": { + "c": "STboxNode *", + "canonical": "STboxNode *" + }, + "params": [ + { + "name": "box", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + } + ] + }, + { + "name": "getQuadrant8D", + "file": "stbox_index.h", + "returnType": { + "c": "uint8", + "canonical": "unsigned char" + }, + "params": [ + { + "name": "centroid", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "inBox", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stboxnode_init", + "file": "stbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "centroid", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "nodebox", + "cType": "STboxNode *", + "canonical": "STboxNode *" + } + ] + }, + { + "name": "stboxnode_quadtree_next", + "file": "stbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "centroid", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "quadrant", + "cType": "uint8", + "canonical": "unsigned char" + }, + { + "name": "next_nodebox", + "cType": "STboxNode *", + "canonical": "STboxNode *" + } + ] + }, + { + "name": "stboxnode_kdtree_next", + "file": "stbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "centroid", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "node", + "cType": "uint8", + "canonical": "unsigned char" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + }, + { + "name": "next_nodebox", + "cType": "STboxNode *", + "canonical": "STboxNode *" + } + ] + }, + { + "name": "overlap8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overlapKD", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "contain8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "containKD", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "left8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overLeft8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "right8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overRight8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "below8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overBelow8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "above8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overAbove8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "front8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overFront8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "back8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overBack8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "before8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overBefore8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "after8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "overAfter8D", + "file": "stbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + }, + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "distance_stbox_nodebox", + "file": "stbox_index.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "query", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "nodebox", + "cType": "const STboxNode *", + "canonical": "const STboxNode *" + } + ] + }, + { + "name": "tspatial_spgist_get_stbox", + "file": "stbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "result", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "mobilitydb_init", + "file": "tgeo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "geo_stbox", + "file": "tgeo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "stbox_geo", + "file": "tgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "tcomp_geo_tgeo", + "file": "tgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + } + ] + }, + { + "name": "tcomp_tgeo_geo", + "file": "tgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + } + ] + }, + { + "name": "ensure_geoaggstate", + "file": "tgeo_aggfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "state", + "cType": "const SkipList *", + "canonical": "const struct SkipList *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ensure_geoaggstate_state", + "file": "tgeo_aggfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "state1", + "cType": "const SkipList *", + "canonical": "const struct SkipList *" + }, + { + "name": "state2", + "cType": "const SkipList *", + "canonical": "const struct SkipList *" + } + ] + }, + { + "name": "tpoint_transform_tcentroid", + "file": "tgeo_aggfuncs.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpointinst_tcentroid_finalfn", + "file": "tgeo_aggfuncs.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tpointseq_tcentroid_finalfn", + "file": "tgeo_aggfuncs.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "point3d_min_dist", + "file": "tgeo_distance.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "p1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "p2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "p3", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "p4", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "fraction", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tgeompointsegm_distance_turnpt", + "file": "tgeo_distance.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tgeogpointsegm_distance_turnpt", + "file": "tgeo_distance.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tinstant_distance", + "file": "tgeo_distance.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "tpointseq_at_geom", + "file": "tgeo_restrict.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpointseq_interperiods", + "file": "tgeo_restrict.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "datum_point4d", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "p", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geopoint_cmp", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geopoint_eq", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geopoint_same", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "datum_point_eq", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "point1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_point_same", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "point1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum2_point_eq", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "point1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum2_point_ne", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "point1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum2_point_same", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "point1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum2_point_nsame", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "point1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum2_geom_centroid", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geo", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum2_geog_centroid", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geo", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "geo_extract_elements", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "geo_serialize", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geo_distance_fn", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "pt_distance_fn", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "datum_geom_distance2d", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_distance3d", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geog_distance", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geog1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geog2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pt_distance2d", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pt_distance3d", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "spatial_flags", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int16", + "canonical": "short" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_srid_is_latlong", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "ensure_spatial_validity", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_not_geodetic", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_same_geodetic", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_same_geodetic_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_same_geodetic_tspatial_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_same_geodetic_tspatial_base", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "base", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ensure_srid_known", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "ensure_same_srid", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "srid1", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "srid2", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "ensure_srid_reconcile", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "srid1", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "srid2", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "result", + "cType": "int32_t *", + "canonical": "int *" + } + ] + }, + { + "name": "ensure_same_dimensionality", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "same_spatial_dimensionality", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_same_spatial_dimensionality", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_same_dimensionality_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "same_dimensionality_tspatial_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_same_dimensionality_tspatial_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_same_spatial_dimensionality_stbox_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_same_geodetic_stbox_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_has_Z_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_has_not_Z_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_has_M_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_has_not_M_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_not_geodetic_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_point_type", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_mline_type", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "circle_type", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_circle_type", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_not_empty", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_stbox_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tspatial_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tspatial_base", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "base", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ensure_valid_tspatial_tspatial", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_spatial_stbox_stbox", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_tgeo_stbox", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_geo_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tgeo_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tgeo_tgeo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_tpoint_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tpoint_tpoint", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "mline_type", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpoint_get_coord", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "coord", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "eacomp_tgeo_geo", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "closest_point2d_on_segment_ratio", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "p", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "A", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "B", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "closest", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "closest_point3dz_on_segment_ratio", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "p", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "A", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "B", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "closest", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "closest_point_on_segment_sphere", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "p", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "A", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "B", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "closest", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "dist", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "interpolate_point4d_spheroid", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "p1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "p2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "p", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "s", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "f", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geopoint_make", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "z", + "cType": "double", + "canonical": "double" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "lwcircle_make", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "radius", + "cType": "double", + "canonical": "double" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "geocircle_make", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "radius", + "cType": "double", + "canonical": "double" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "pointsegm_interpolate", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ratio", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "pointsegm_locate", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "point", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tgeompointsegm_intersection", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tgeogpointsegm_intersection", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "geopoint_collinear", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value3", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "lwpointarr_remove_duplicates", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "points", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "lwpointarr_make_trajectory", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "points", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "lwline_make", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "value1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "lwcoll_from_points_lines", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "points", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "lines", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "npoints", + "cType": "int", + "canonical": "int" + }, + { + "name": "nlines", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpointseq_stops_iter", + "file": "tgeo_spatialfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "mintunits", + "cType": "int64", + "canonical": "long" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "datum_geom_contains", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_covers", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_disjoint2d", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_disjoint3d", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geog_disjoint", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geog1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geog2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_intersects2d", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_intersects3d", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geog_intersects", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geog1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geog2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_touches", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_dwithin2d", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_dwithin3d", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geom1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geom2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geog_dwithin", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geog1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geog2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_geom_relate_pattern", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "geog1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "geog2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "p", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "geo_disjoint_fn", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "geo_disjoint_fn_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "uint8_t", + "canonical": "unsigned char" + } + ] + }, + { + "name": "geo_intersects_fn", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "geo_intersects_fn_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "uint8_t", + "canonical": "unsigned char" + } + ] + }, + { + "name": "geo_dwithin_fn", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "datum_func3", + "canonical": "unsigned long (*)(unsigned long, unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "geo_dwithin_fn_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "datum_func3", + "canonical": "unsigned long (*)(unsigned long, unsigned long, unsigned long)" + }, + "params": [ + { + "name": "flags1", + "cType": "int16", + "canonical": "short" + }, + { + "name": "flags2", + "cType": "uint8_t", + "canonical": "unsigned char" + } + ] + }, + { + "name": "tpointsegm_tdwithin_turnpt", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "spatialrel_geo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "gs2", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "varfunc", + "canonical": "unsigned long (*)(unsigned long, ...)" + }, + { + "name": "numparam", + "cType": "int", + "canonical": "int" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "spatialrel_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "varfunc", + "canonical": "unsigned long (*)(unsigned long, ...)" + }, + { + "name": "numparam", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ea_contains_geo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_tgeo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_geo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_tgeo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_geo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_tgeo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_geo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_tgeo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_tpoint_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_tgeo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_dwithin_tgeo_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_dwithin_tgeo_tgeo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_spatialrel_tspatial_geo", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_spatialrel_tspatial_tspatial", + "file": "tgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tspatialrel_tspatial_base", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "base", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "varfunc", + "canonical": "unsigned long (*)(unsigned long, ...)" + }, + { + "name": "numparam", + "cType": "int", + "canonical": "int" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tspatialrel_tspatial_tspatial", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "varfunc", + "canonical": "unsigned long (*)(unsigned long, ...)" + }, + { + "name": "numparam", + "cType": "int", + "canonical": "int" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinterrel_tgeo_geo", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "tinter", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinterrel_tspatial_base", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "base", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "tinter", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "tinterrel_tspatial_tspatial", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tinter", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdwithin_tspatial_tspatial", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "sync1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "sync2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "datum_func3", + "canonical": "unsigned long (*)(unsigned long, unsigned long, unsigned long)" + }, + { + "name": "tpfn", + "cType": "tpfunc_temp", + "canonical": "int (*)(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, long, long, long *, long *)" + } + ] + }, + { + "name": "tdwithin_add_solutions", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "solutions", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc1", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "t1", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t2", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tdwithin_tspatial_spatial", + "file": "tgeo_tempspatialrels.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "base", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dist", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "datum_func3", + "canonical": "unsigned long (*)(unsigned long, unsigned long, unsigned long)" + }, + { + "name": "tpfn", + "cType": "tpfunc_temp", + "canonical": "int (*)(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, long, long, long *, long *)" + } + ] + }, + { + "name": "bitmatrix_make", + "file": "tgeo_tile.h", + "returnType": { + "c": "BitMatrix *", + "canonical": "BitMatrix *" + }, + "params": [ + { + "name": "count", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ndims", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpoint_set_tiles", + "file": "tgeo_tile.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "state", + "cType": "const STboxGridState *", + "canonical": "const struct STboxGridState *" + }, + { + "name": "bm", + "cType": "BitMatrix *", + "canonical": "BitMatrix *" + } + ] + }, + { + "name": "tpoint_at_tile", + "file": "tgeo_tile.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "stbox_tile_state_set", + "file": "tgeo_tile.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "z", + "cType": "double", + "canonical": "double" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "tunits", + "cType": "int64", + "canonical": "long" + }, + { + "name": "hasx", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hast", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32", + "canonical": "int" + }, + { + "name": "result", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "stbox_tile_state_make", + "file": "tgeo_tile.h", + "returnType": { + "c": "STboxGridState *", + "canonical": "struct STboxGridState *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "int", + "canonical": "int" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "stbox_tile_state_next", + "file": "tgeo_tile.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "state", + "cType": "STboxGridState *", + "canonical": "struct STboxGridState *" + } + ] + }, + { + "name": "stbox_tile_state_get", + "file": "tgeo_tile.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "state", + "cType": "STboxGridState *", + "canonical": "struct STboxGridState *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tgeo_space_time_tile_init", + "file": "tgeo_tile.h", + "returnType": { + "c": "STboxGridState *", + "canonical": "struct STboxGridState *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "ntiles", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "stbox_space_time_tile", + "file": "tgeo_tile.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "point", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "hasx", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hast", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "create_trip", + "file": "tpoint_datagen.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "lines", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "maxSpeeds", + "cType": "const double *", + "canonical": "const double *" + }, + { + "name": "categories", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "noEdges", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "startTime", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "disturbData", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "verbosity", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spatialarr_wkt_out", + "file": "tspatial.h", + "returnType": { + "c": "char **", + "canonical": "char **" + }, + "params": [ + { + "name": "spatialarr", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "extended", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "spatialbase_as_text", + "file": "tspatial.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spatialbase_as_ewkt", + "file": "tspatial.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "point_transf_pj", + "file": "tspatial.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "srid_to", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "pj", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tgeoinst_set_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tgeoinstarr_set_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tgeoseq_expand_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tspatialinst_set_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tspatialinstarr_set_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "tspatialseqarr_set_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tspatialseq_expand_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "spatialarr_set_bbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "boxop_tspatial_stbox", + "file": "tspatial_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "func", + "cType": "bool (*)(const STBox *, const STBox *)", + "canonical": "_Bool (*)(const STBox *, const STBox *)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "boxop_tspatial_tspatial", + "file": "tspatial_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "bool (*)(const STBox *, const STBox *)", + "canonical": "_Bool (*)(const STBox *, const STBox *)" + } + ] + }, + { + "name": "srid_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "srid", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "spatial_parse_elem", + "file": "tspatial_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "delim", + "cType": "char", + "canonical": "char" + }, + { + "name": "temp_srid", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "geo_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "delim", + "cType": "char", + "canonical": "char" + }, + { + "name": "srid", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "stbox_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "tpoint_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tspatialinst_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp_srid", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatialseq_disc_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "temp_srid", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatialseq_cont_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "temp_srid", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatialseqset_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "temp_srid", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatial_parse", + "file": "tspatial_parser.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "h3_are_neighbor_cells_meos", + "file": "h3_generated.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "destination", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cells_to_directed_edge_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "destination", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_is_valid_directed_edge_meos", + "file": "h3_generated.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "edge", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_get_directed_edge_origin_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "edge", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_get_directed_edge_destination_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "edge", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_parent_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_cell_to_center_child_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_cell_to_child_pos_meos", + "file": "h3_generated.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "child", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "parentRes", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_child_pos_to_cell_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "childPos", + "cType": "int64", + "canonical": "long" + }, + { + "name": "parent", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "childRes", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_get_resolution_meos", + "file": "h3_generated.h", + "returnType": { + "c": "int32", + "canonical": "int" + }, + "params": [ + { + "name": "hex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_get_base_cell_number_meos", + "file": "h3_generated.h", + "returnType": { + "c": "int32", + "canonical": "int" + }, + "params": [ + { + "name": "hex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_is_valid_cell_meos", + "file": "h3_generated.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "hex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_is_res_class_iii_meos", + "file": "h3_generated.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "hex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_is_pentagon_meos", + "file": "h3_generated.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "hex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_get_num_cells_meos", + "file": "h3_generated.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_grid_distance_meos", + "file": "h3_generated.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "originIndex", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "h3Index", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_vertex_meos", + "file": "h3_generated.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "vertexNum", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_is_valid_vertex_meos", + "file": "h3_generated.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "vertex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_in", + "file": "h3index.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "h3index_out", + "file": "h3index.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_eq", + "file": "h3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_ne", + "file": "h3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_lt", + "file": "h3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_le", + "file": "h3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_gt", + "file": "h3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_ge", + "file": "h3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_cmp", + "file": "h3index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_hash", + "file": "h3index.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_grid_disk", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "k", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "h3_grid_ring", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "k", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "h3_grid_path_cells", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "start", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_children", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "childRes", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "h3_compact_cells", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cells", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "h3_uncompact_cells", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cells", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "res", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "h3_origin_to_directed_edges", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_vertexes", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_get_icosahedron_faces", + "file": "h3index_sets.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ensure_valid_th3index_th3index", + "file": "th3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_th3index_h3index", + "file": "th3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ensure_valid_th3index_tgeogpoint", + "file": "th3index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "datum2_h3index_eq", + "file": "th3index.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "d2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_h3index_ne", + "file": "th3index.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "d2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "h3index_set_stbox", + "file": "th3index_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "h3indexarr_set_stbox", + "file": "th3index_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "th3indexinst_set_stbox", + "file": "th3index_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "th3indexinstarr_set_stbox", + "file": "th3index_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "th3indexseq_expand_stbox", + "file": "th3index_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "h3_gs_point_to_cell", + "file": "th3index_internal.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "point", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_cell_to_gs_point", + "file": "th3index_internal.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_gs_boundary", + "file": "th3index_internal.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "cell_boundary_to_gs", + "file": "th3index_internal.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "bnd", + "cType": "const CellBoundary *", + "canonical": "const CellBoundary *" + } + ] + }, + { + "name": "h3_sample_step_deg", + "file": "th3index_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_latlng_deg_to_cell", + "file": "th3index_internal.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "lat_deg", + "cType": "double", + "canonical": "double" + }, + { + "name": "lng_deg", + "cType": "double", + "canonical": "double" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "h3_cell_to_parent_next_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_center_child_next_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_directed_edge_to_gs_boundary", + "file": "th3index_internal.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "edge", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_vertex_to_gs_point", + "file": "th3index_internal.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "vertex", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_cell_to_local_ij_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3_local_ij_to_cell_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "coord", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "h3_unit_from_cstring", + "file": "th3index_internal.h", + "returnType": { + "c": "H3Unit", + "canonical": "H3Unit" + }, + "params": [ + { + "name": "unit", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "h3_cell_area_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "unit", + "cType": "H3Unit", + "canonical": "H3Unit" + } + ] + }, + { + "name": "h3_edge_length_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "edge", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "unit", + "cType": "H3Unit", + "canonical": "H3Unit" + } + ] + }, + { + "name": "h3_gs_great_circle_distance_meos", + "file": "th3index_internal.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "a", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "b", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "unit", + "cType": "H3Unit", + "canonical": "H3Unit" + } + ] + }, + { + "name": "datum_h3_get_resolution", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_get_base_cell_number", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_is_valid_cell", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_is_res_class_iii", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_is_pentagon", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_parent", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "res_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_parent_next", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_center_child", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "res_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_center_child_next", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_child_pos", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "parent_res_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_child_pos_to_cell", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pos_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "parent_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "child_res_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_are_neighbor_cells", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dest_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cells_to_directed_edge", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dest_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_is_valid_directed_edge", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_get_directed_edge_origin", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_get_directed_edge_destination", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_directed_edge_to_boundary", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_vertex", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "vnum_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_vertex_to_latlng", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_is_valid_vertex", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_grid_distance", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "dest_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_local_ij", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_local_ij_to_cell", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "origin_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "coord_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_latlng_to_cell", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "point_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "res_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_latlng", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_to_boundary", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_cell_area", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "unit_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_edge_length", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "edge_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "unit_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_h3_great_circle_distance", + "file": "th3index_internal.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "a_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "b_d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "unit_d", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "json_in", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "json_out", + "file": "meos_json.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_from_text", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "unique_keys", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_in", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "jsonb_out", + "file": "meos_json.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "json_make", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "keys_vals", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "json_make_two_arg", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "values", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_copy", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_make", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "keys_vals", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_make_two_arg", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "values", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_to_bool", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_cstring", + "file": "meos_json.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_float4", + "file": "meos_json.h", + "returnType": { + "c": "float4", + "canonical": "float" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_float8", + "file": "meos_json.h", + "returnType": { + "c": "float8", + "canonical": "double" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_int16", + "file": "meos_json.h", + "returnType": { + "c": "int16", + "canonical": "short" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_int32", + "file": "meos_json.h", + "returnType": { + "c": "int32", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_int64", + "file": "meos_json.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_numeric", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_to_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "json_array_element", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "element", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "json_array_element_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "element", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "json_array_elements", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "json_array_elements_text", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "json_array_length", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "json_each", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "values", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "json_each_text", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "values", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "json_extract_path", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "json_extract_path_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "json_object_field", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "json_object_field_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "json_object_keys", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "json_typeof", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_array_element", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "element", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_array_element_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "element", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_array_elements", + "file": "meos_json.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "jsonb_array_elements_text", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "jsonb_array_length", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_contained", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_contains", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_each", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "values", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "jsonb_each_text", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "values", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "jsonb_exists", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_exists_array", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "keys_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "keys_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "any", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_extract_path", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_extract_path_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_hash", + "file": "meos_json.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_hash_extended", + "file": "meos_json.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "jsonb_object_field", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_object_field_text", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_object_keys", + "file": "meos_json.h", + "returnType": { + "c": "text **", + "canonical": "struct varlena **" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "json_strip_nulls", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "js", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "strip_in_arrays", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_concat", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_delete", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_delete_array", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "keys_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "keys_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_delete_index", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "idx", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_delete_path", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_insert", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "after", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_pretty", + "file": "meos_json.h", + "returnType": { + "c": "text *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_set", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "create", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_set_lax", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "create", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "handle_null", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonb_strip_nulls", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "strip_in_arrays", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_cmp", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_eq", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_ge", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_gt", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_le", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_lt", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_ne", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb1", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jb2", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_path_exists", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_path_match", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_path_query_all", + "file": "meos_json.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "jsonb_path_query_array", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonb_path_query_first", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonpath_in", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "jsonpath_copy", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonpath_out", + "file": "meos_json.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonbset_in", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "jsonbset_out", + "file": "meos_json.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonbset_make", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const int **", + "canonical": "const int **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonb_to_set", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonbset_end_value", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "jsonbset_start_value", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "jsonbset_value_n", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "jsonbset_values", + "file": "meos_json.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "concat_jsonbset_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_array_length", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "jsonbset_object_field", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_array_element", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "idx", + "cType": "int", + "canonical": "int" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_delete_index", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "idx", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonbset_delete", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonbset_delete_array", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonbset_exists", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "jsonbset_exists_array", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "any", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_set", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "create", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "lax", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_to_alphanumset", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "settype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_to_intset", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_to_floatset", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_to_textset_key", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_strip_nulls", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "strip_in_arrays", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_pretty", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "jsonbset_delete_path", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "jsonbset_extract_path", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbset_insert", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "after", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_path_exists", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_path_match", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_path_query_array", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbset_path_query_first", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contained_jsonb_set", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jb", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "intersection_jsonb_set", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "jsonb_union_transfn", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "minus_jsonb_set", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "union_jsonb_set", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tjsonb_from_mfjson", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tjsonb_in", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tjsonb_out", + "file": "meos_json.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonbinst_from_mfjson", + "file": "meos_json.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tjsonbinst_in", + "file": "meos_json.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tjsonbseq_from_mfjson", + "file": "meos_json.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tjsonbseq_in", + "file": "meos_json.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tjsonbseqset_from_mfjson", + "file": "meos_json.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + } + ] + }, + { + "name": "tjsonbseqset_in", + "file": "meos_json.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tjsonb_from_base_temp", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "jsonb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonbinst_make", + "file": "meos_json.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "jsonb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tjsonbseq_from_base_tstzset", + "file": "meos_json.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "jsonb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tjsonbseq_from_base_tstzspan", + "file": "meos_json.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "jsonb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "sp", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tjsonbseqset_from_base_tstzspanset", + "file": "meos_json.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "jsonb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tjsonb_to_ttext", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ttext_to_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonb_end_value", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonb_start_value", + "file": "meos_json.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonb_value_at_timestamptz", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "tjsonb_value_n", + "file": "meos_json.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "tjsonb_values", + "file": "meos_json.h", + "returnType": { + "c": "int **", + "canonical": "int **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "concat_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "concat_tjsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contains_tjsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "null_handle_type_from_string", + "file": "meos_json.h", + "returnType": { + "c": "nullHandleType", + "canonical": "nullHandleType" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tjson_array_element", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "idx", + "cType": "int", + "canonical": "int" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjson_array_length", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjson_extract_path", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjson_object_field", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjson_strip_nulls", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "strip_in_arrays", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_array_element", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "idx", + "cType": "int", + "canonical": "int" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_array_length", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonb_delete", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tjsonb_delete_array", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tjsonb_delete_index", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "idx", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tjsonb_delete_path", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tjsonb_exists", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + } + ] + }, + { + "name": "tjsonb_exists_array", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "any", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_extract_path", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "path_elems", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_insert", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "after", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_object_field", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "astext", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_path_exists", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_path_match", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_path_query_array", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_path_query_first", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jp", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "vars", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "silent", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "tz", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_pretty", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tjsonb_set", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "keys", + "cType": "text **", + "canonical": "struct varlena **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "newjb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "create", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "handle_null", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "lax", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_strip_nulls", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "strip_in_arrays", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tjsonb_to_tbool", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_to_tfloat", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_to_tint", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_to_ttext_key", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "tjsonb_at_value", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jsb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tjsonb_minus_value", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jsb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_eq_jsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_eq_tjsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_jsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_ne_tjsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_jsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ever_eq_tjsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_jsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ever_ne_tjsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_jsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tne_jsonb_tjsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tjsonb_jsonb", + "file": "meos_json.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "setPath", + "file": "tjsonb.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "it", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "path_elems", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "path_nulls", + "cType": "bool *", + "canonical": "_Bool *" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "st", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + }, + { + "name": "newval", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "op_type", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "setPathObject", + "file": "tjsonb.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "it", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "path_elems", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "path_nulls", + "cType": "bool *", + "canonical": "_Bool *" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "st", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + }, + { + "name": "newval", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "npairs", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "op_type", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "setPathArray", + "file": "tjsonb.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "it", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "path_elems", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "path_nulls", + "cType": "bool *", + "canonical": "_Bool *" + }, + { + "name": "path_len", + "cType": "int", + "canonical": "int" + }, + { + "name": "st", + "cType": "int **", + "canonical": "int **" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + }, + { + "name": "newval", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "nelems", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "op_type", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "datum_jsonb_concat", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_contained", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_contains", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_delete", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "key", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_delete_array", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "array", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_delete_index", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "idx", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_array_element", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "element", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_array_element", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "element", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_array_element_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "element", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_array_element_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "element", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_exists", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_exists_array", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "array", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "any", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_array_length", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_array_length", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_object_field", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "key", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_object_field", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "key", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_object_field_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "key", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_object_field_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "key", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_strip_nulls", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "strip_in_arrays", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_strip_nulls", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "strip_in_arrays", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_pretty", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_extract_path", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_elems", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_len", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_extract_path", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_elems", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_len", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_json_extract_path_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_elems", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_len", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_extract_path_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_elems", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "path_len", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_set", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "keys", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "newjb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "create", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_set_lax", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "keys", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "newjb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "create", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "null_handle", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_delete_path", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "keys", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_insert", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "keys", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "count", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "newjb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "after", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_path_exists", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "jp", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "vars", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "silent", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "tz", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_path_match", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "jp", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "vars", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "silent", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "tz", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_path_query_array", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "jp", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "vars", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "silent", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "tz", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_path_query_first", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "jp", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "vars", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "silent", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "tz", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_to_text", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_text_to_jsonb", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "txt", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_jsonb_to_alphanum", + "file": "tjsonb.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "jb", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "key", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "null_handle", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tjsonb_to_talphanum", + "file": "tjsonb.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "key", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "resbasetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "null_handle", + "cType": "nullHandleType", + "canonical": "nullHandleType" + } + ] + }, + { + "name": "jsonbfunc_jsonbset", + "file": "tjsonb.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "func", + "cType": "datum_func1", + "canonical": "unsigned long (*)(unsigned long)" + }, + { + "name": "intype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "restype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "jsonbfunc_jsonbset_jsonb", + "file": "tjsonb.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "jb", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "jsonbfunc_jsonbset_text", + "file": "tjsonb.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "txt", + "cType": "const text *", + "canonical": "const struct varlena *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "meos_temporal_to_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "out_schema", + "cType": "struct ArrowSchema *", + "canonical": "struct ArrowSchema *" + }, + { + "name": "out_array", + "cType": "struct ArrowArray *", + "canonical": "struct ArrowArray *" + } + ] + }, + { + "name": "meos_temporal_from_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "schema", + "cType": "const struct ArrowSchema *", + "canonical": "const struct ArrowSchema *" + }, + { + "name": "array", + "cType": "const struct ArrowArray *", + "canonical": "const struct ArrowArray *" + } + ] + }, + { + "name": "meos_temporal_arrow_roundtrip", + "file": "meos_arrow.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "meos_set_to_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "out_schema", + "cType": "struct ArrowSchema *", + "canonical": "struct ArrowSchema *" + }, + { + "name": "out_array", + "cType": "struct ArrowArray *", + "canonical": "struct ArrowArray *" + } + ] + }, + { + "name": "meos_set_from_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "schema", + "cType": "const struct ArrowSchema *", + "canonical": "const struct ArrowSchema *" + }, + { + "name": "array", + "cType": "const struct ArrowArray *", + "canonical": "const struct ArrowArray *" + } + ] + }, + { + "name": "meos_set_arrow_roundtrip", + "file": "meos_arrow.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "meos_span_to_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "out_schema", + "cType": "struct ArrowSchema *", + "canonical": "struct ArrowSchema *" + }, + { + "name": "out_array", + "cType": "struct ArrowArray *", + "canonical": "struct ArrowArray *" + } + ] + }, + { + "name": "meos_span_from_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "schema", + "cType": "const struct ArrowSchema *", + "canonical": "const struct ArrowSchema *" + }, + { + "name": "array", + "cType": "const struct ArrowArray *", + "canonical": "const struct ArrowArray *" + } + ] + }, + { + "name": "meos_span_arrow_roundtrip", + "file": "meos_arrow.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "meos_spanset_to_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "out_schema", + "cType": "struct ArrowSchema *", + "canonical": "struct ArrowSchema *" + }, + { + "name": "out_array", + "cType": "struct ArrowArray *", + "canonical": "struct ArrowArray *" + } + ] + }, + { + "name": "meos_spanset_from_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "schema", + "cType": "const struct ArrowSchema *", + "canonical": "const struct ArrowSchema *" + }, + { + "name": "array", + "cType": "const struct ArrowArray *", + "canonical": "const struct ArrowArray *" + } + ] + }, + { + "name": "meos_spanset_arrow_roundtrip", + "file": "meos_arrow.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "meos_tbox_to_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "out_schema", + "cType": "struct ArrowSchema *", + "canonical": "struct ArrowSchema *" + }, + { + "name": "out_array", + "cType": "struct ArrowArray *", + "canonical": "struct ArrowArray *" + } + ] + }, + { + "name": "meos_tbox_from_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "schema", + "cType": "const struct ArrowSchema *", + "canonical": "const struct ArrowSchema *" + }, + { + "name": "array", + "cType": "const struct ArrowArray *", + "canonical": "const struct ArrowArray *" + } + ] + }, + { + "name": "meos_tbox_arrow_roundtrip", + "file": "meos_arrow.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "meos_stbox_to_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "out_schema", + "cType": "struct ArrowSchema *", + "canonical": "struct ArrowSchema *" + }, + { + "name": "out_array", + "cType": "struct ArrowArray *", + "canonical": "struct ArrowArray *" + } + ] + }, + { + "name": "meos_stbox_from_arrow", + "file": "meos_arrow.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "schema", + "cType": "const struct ArrowSchema *", + "canonical": "const struct ArrowSchema *" + }, + { + "name": "array", + "cType": "const struct ArrowArray *", + "canonical": "const struct ArrowArray *" + } + ] + }, + { + "name": "meos_stbox_arrow_roundtrip", + "file": "meos_arrow.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "h3index_from_wkb", + "file": "meos_h3.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "h3index_from_hexwkb", + "file": "meos_h3.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "h3index_as_wkb", + "file": "meos_h3.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "h3index_as_hexwkb", + "file": "meos_h3.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "th3index_in", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "th3indexinst_in", + "file": "meos_h3.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "th3indexseq_in", + "file": "meos_h3.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "th3indexseqset_in", + "file": "meos_h3.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "th3index_make", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "value", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "th3indexinst_make", + "file": "meos_h3.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "value", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "th3indexseq_make", + "file": "meos_h3.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "values", + "cType": "const H3Index *", + "canonical": "const unsigned long *" + }, + { + "name": "times", + "cType": "const TimestampTz *", + "canonical": "const long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "th3indexseqset_make", + "file": "meos_h3.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "const TSequence **", + "canonical": "const TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "th3index_start_value", + "file": "meos_h3.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_end_value", + "file": "meos_h3.h", + "returnType": { + "c": "H3Index", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_value_n", + "file": "meos_h3.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "H3Index *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "th3index_values", + "file": "meos_h3.h", + "returnType": { + "c": "H3Index *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "th3index_value_at_timestamptz", + "file": "meos_h3.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "H3Index *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tbigint_to_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_to_tbigint", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_h3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_th3index_h3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_ne_h3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_th3index_h3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_eq_h3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_th3index_h3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_ne_h3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_th3index_h3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_eq_th3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_th3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_th3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_th3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_h3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_th3index_h3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "teq_th3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_h3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_th3index_h3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "H3Index", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tne_th3index_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_get_resolution", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_get_base_cell_number", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_is_valid_cell", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_is_res_class_iii", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_is_pentagon", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_to_parent", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "th3index_cell_to_parent_next", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_to_center_child", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "th3index_cell_to_center_child_next", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_to_child_pos", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "parent_res", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "th3index_child_pos_to_cell", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "child_pos", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "parent", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "child_res", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "tgeogpoint_to_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "tgeompoint_to_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "th3index_to_tgeogpoint", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_to_tgeompoint", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_to_boundary", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "geo_to_h3index_set", + "file": "meos_h3.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "ever_eq_h3indexset_th3index", + "file": "meos_h3.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cells", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "th3idx", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_are_neighbor_cells", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "origin", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dest", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cells_to_directed_edge", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "origin", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dest", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_is_valid_directed_edge", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "edge", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_get_directed_edge_origin", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "edge", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_get_directed_edge_destination", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "edge", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_directed_edge_to_boundary", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "edge", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_to_vertex", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vertex_num", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "th3index_vertex_to_latlng", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_is_valid_vertex", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_grid_distance", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "origin", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dest", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_to_local_ij", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "origin", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_local_ij_to_cell", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "origin", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "coord", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "th3index_cell_area", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unit", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "th3index_edge_length", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unit", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeogpoint_great_circle_distance", + "file": "meos_h3.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "a", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unit", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "proj_get_context", + "file": "meos_internal_geo.h", + "returnType": { + "c": "PJ_CONTEXT *", + "canonical": "struct pj_ctx *" + }, + "params": [] + }, + { + "name": "geos_get_context", + "file": "meos_internal_geo.h", + "returnType": { + "c": "GEOSContextHandle_t", + "canonical": "struct GEOSContextHandle_HS *" + }, + "params": [] + }, + { + "name": "datum_geo_round", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "point_round", + "file": "meos_internal_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "stbox_set", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "hasx", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32", + "canonical": "int" + }, + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "gbox_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "result", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "geo_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "geoarr_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "spatial_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "spatialset_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "stbox_set_box3d", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box3d", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "stbox_set_gbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "gbox", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tstzset_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tstzspan_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tstzspanset_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "stbox_expand", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "inter_stbox_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "box2", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "result", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tgeogpointinst_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tgeogpointinst_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeogpointseq_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeogpointseq_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeogpointseqset_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeogpointseqset_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeompointinst_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tgeompointinst_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeompointseq_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeompointseq_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeompointseqset_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeompointseqset_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeographyinst_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tgeographyinst_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeographyseq_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeographyseq_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeographyseqset_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeographyseqset_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeometryinst_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tgeometryinst_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tgeometryseq_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeometryseq_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeometryseqset_from_mfjson", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "mfjson", + "cType": "json_object *", + "canonical": "struct json_object *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeometryseqset_in", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tspatial_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tspatialseq_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tspatialseqset_set_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tgeo_restrict_elevation", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_restrict_geom", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_restrict_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoinst_restrict_geom", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoinst_restrict_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoseq_restrict_geom", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoseq_restrict_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoseqset_restrict_geom", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoseqset_restrict_stbox", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "spatial_srid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spatial_set_srid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tspatialinst_srid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tpointseq_azimuth", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tpointseq_cumulative_length", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "prevlength", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tpointseq_is_simple", + "file": "meos_internal_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tpointseq_length", + "file": "meos_internal_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tpointseq_linear_trajectory", + "file": "meos_internal_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeoseq_stboxes", + "file": "meos_internal_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeoseq_split_n_stboxes", + "file": "meos_internal_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "max_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpointseqset_azimuth", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tpointseqset_cumulative_length", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tpointseqset_is_simple", + "file": "meos_internal_geo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tpointseqset_length", + "file": "meos_internal_geo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tgeoseqset_stboxes", + "file": "meos_internal_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeoseqset_split_n_stboxes", + "file": "meos_internal_geo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "max_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tgeominst_tgeoginst", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "oper", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeomseq_tgeogseq", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "oper", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeomseqset_tgeogseqset", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "oper", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeom_tgeog", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "oper", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tgeo_tpoint", + "file": "meos_internal_geo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "oper", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tspatialinst_set_srid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "TInstant *", + "canonical": "TInstant *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tpointseq_make_simple", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatialseq_set_srid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tpointseqset_make_simple", + "file": "meos_internal_geo.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tspatialseqset_set_srid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tpointseq_twcentroid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tpointseqset_twcentroid", + "file": "meos_internal_geo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "npoint_as_ewkt", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "npoint_as_hexwkb", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "npoint_as_text", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "npoint_as_wkb", + "file": "meos_npoint.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "npoint_from_hexwkb", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "npoint_from_wkb", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "npoint_in", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "npoint_out", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "nsegment_in", + "file": "meos_npoint.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "nsegment_out", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "npoint_make", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "pos", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "nsegment_make", + "file": "meos_npoint.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "pos1", + "cType": "double", + "canonical": "double" + }, + { + "name": "pos2", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "geompoint_to_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "geom_to_nsegment", + "file": "meos_npoint.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "npoint_to_geompoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_to_nsegment", + "file": "meos_npoint.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_to_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "nsegment_to_geom", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_to_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "npoint_hash", + "file": "meos_npoint.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_hash_extended", + "file": "meos_npoint.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "npoint_position", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_route", + "file": "meos_npoint.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "nsegment_end_position", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_route", + "file": "meos_npoint.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_start_position", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "route_exists", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "route_geom", + "file": "meos_npoint.h", + "returnType": { + "c": "const int *", + "canonical": "const int *" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "route_length", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + } + ] + }, + { + "name": "npoint_round", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "nsegment_round", + "file": "meos_npoint.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "get_srid_ways", + "file": "meos_npoint.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [] + }, + { + "name": "npoint_srid", + "file": "meos_npoint.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "nsegment_srid", + "file": "meos_npoint.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "npoint_timestamptz_to_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "npoint_tstzspan_to_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "npoint_cmp", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_eq", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_ge", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_gt", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_le", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_lt", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_ne", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_same", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "nsegment_cmp", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_eq", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_ge", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_gt", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_le", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_lt", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "nsegment_ne", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns1", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "ns2", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + } + ] + }, + { + "name": "npointset_in", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "npointset_out", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "npointset_make", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "Npoint **", + "canonical": "Npoint **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "npoint_to_set", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npointset_end_value", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "npointset_routes", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "npointset_start_value", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "npointset_value_n", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Npoint **", + "canonical": "Npoint **" + } + ] + }, + { + "name": "npointset_values", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint **", + "canonical": "Npoint **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "contained_npoint_set", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "intersection_npoint_set", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "minus_npoint_set", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npoint_union_transfn", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "union_npoint_set", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "tnpoint_in", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tnpoint_from_mfjson", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "mfjson", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tnpoint_out", + "file": "meos_npoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tnpointinst_make", + "file": "meos_npoint.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tnpoint_from_base_temp", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpointseq_from_base_tstzset", + "file": "meos_npoint.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tnpointseq_from_base_tstzspan", + "file": "meos_npoint.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tnpointseqset_from_base_tstzspanset", + "file": "meos_npoint.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tgeompoint_to_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_to_tgeompoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_cumulative_length", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_end_value", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_length", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_positions", + "file": "meos_npoint.h", + "returnType": { + "c": "Nsegment **", + "canonical": "Nsegment **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnpoint_route", + "file": "meos_npoint.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_routes", + "file": "meos_npoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_speed", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_start_value", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_trajectory", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_value_at_timestamptz", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value", + "cType": "Npoint **", + "canonical": "Npoint **" + } + ] + }, + { + "name": "tnpoint_value_n", + "file": "meos_npoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Npoint **", + "canonical": "Npoint **" + } + ] + }, + { + "name": "tnpoint_values", + "file": "meos_npoint.h", + "returnType": { + "c": "Npoint **", + "canonical": "Npoint **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnpoint_twcentroid", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_at_geom", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tnpoint_at_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "tnpoint_at_npointset", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tnpoint_at_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnpoint_minus_geom", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tnpoint_minus_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "tnpoint_minus_npointset", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tnpoint_minus_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdistance_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "tdistance_tnpoint_geo", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdistance_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_tnpoint_geo", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "nad_tnpoint_stbox", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nai_tnpoint_geo", + "file": "meos_npoint.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nai_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "nai_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "shortestline_tnpoint_geo", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "shortestline_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "shortestline_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpoint_tcentroid_transfn", + "file": "meos_npoint.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_npoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "always_eq_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_npoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "always_ne_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_npoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "ever_eq_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_npoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "ever_ne_tnpoint_tnpoint", + "file": "meos_npoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "tne_tnpoint_npoint", + "file": "meos_npoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "pcpoint_hex_in", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpoint *", + "canonical": "struct Pcpoint *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pcpoint_hex_out", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pcpoint_from_hexwkb", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpoint *", + "canonical": "struct Pcpoint *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pcpoint_as_hexwkb", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_copy", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpoint *", + "canonical": "struct Pcpoint *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_get_pcid", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint32_t", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_hash", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_hash_extended", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "pcpoint_get_x", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + }, + { + "name": "out", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "pcpoint_get_y", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + }, + { + "name": "out", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "pcpoint_get_z", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + }, + { + "name": "out", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "pcpoint_get_dim", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + }, + { + "name": "name", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "out", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "pcpoint_to_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + } + ] + }, + { + "name": "meos_pc_schema", + "file": "meos_pointcloud.h", + "returnType": { + "c": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + }, + "params": [ + { + "name": "pcid", + "cType": "uint32_t", + "canonical": "unsigned int" + } + ] + }, + { + "name": "meos_pc_schema_register", + "file": "meos_pointcloud.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "pcid", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + } + ] + }, + { + "name": "meos_pc_schema_register_xml", + "file": "meos_pointcloud.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "pcid", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "schema", + "cType": "PCSCHEMA *", + "canonical": "struct PCSCHEMA *" + }, + { + "name": "xml_text", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "meos_pc_schema_xml", + "file": "meos_pointcloud.h", + "returnType": { + "c": "const char *", + "canonical": "const char *" + }, + "params": [ + { + "name": "pcid", + "cType": "uint32_t", + "canonical": "unsigned int" + } + ] + }, + { + "name": "meos_pc_schema_clear", + "file": "meos_pointcloud.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [] + }, + { + "name": "pcpoint_cmp", + "file": "meos_pointcloud.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_eq", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_ne", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_lt", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_le", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_gt", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_ge", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpatch_hex_in", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pcpatch_hex_out", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pcpatch_from_hexwkb", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pcpatch_as_hexwkb", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_copy", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_get_pcid", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint32_t", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_npoints", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint32_t", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_hash", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_hash_extended", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "pcpatch_cmp", + "file": "meos_pointcloud.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_eq", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_ne", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_lt", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_le", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_gt", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_ge", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpointset_in", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pcpointset_out", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pcpointset_make", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "Pcpoint **", + "canonical": "struct Pcpoint **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pcpoint_to_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpointset_start_value", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpoint *", + "canonical": "struct Pcpoint *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "pcpointset_end_value", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpoint *", + "canonical": "struct Pcpoint *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "pcpointset_value_n", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Pcpoint **", + "canonical": "struct Pcpoint **" + } + ] + }, + { + "name": "pcpointset_values", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpoint **", + "canonical": "struct Pcpoint **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_pcpoint", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pt", + "cType": "Pcpoint *", + "canonical": "struct Pcpoint *" + } + ] + }, + { + "name": "contained_pcpoint_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_pcpoint_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_pcpoint", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "minus_pcpoint_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_pcpoint", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "union_pcpoint_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_pcpoint", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_union_transfn", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpatchset_in", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pcpatchset_out", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pcpatchset_make", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "Pcpatch **", + "canonical": "struct Pcpatch **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pcpatch_to_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatchset_start_value", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "pcpatchset_end_value", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "pcpatchset_value_n", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Pcpatch **", + "canonical": "struct Pcpatch **" + } + ] + }, + { + "name": "pcpatchset_values", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Pcpatch **", + "canonical": "struct Pcpatch **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_pcpatch", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pa", + "cType": "Pcpatch *", + "canonical": "struct Pcpatch *" + } + ] + }, + { + "name": "contained_pcpatch_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_pcpatch_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_pcpatch", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "minus_pcpatch_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_pcpatch", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "union_pcpatch_set", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_pcpatch", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_union_transfn", + "file": "meos_pointcloud.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "tpcbox_in", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tpcbox_out", + "file": "meos_pointcloud.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpcbox_make", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "hasx", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hasz", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "hast", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "pcid", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "zmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "period", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tpcbox_copy", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "pcpatch_to_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "tpcbox_hasx", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_hasz", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_hast", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_geodetic", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_xmin", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpcbox_xmax", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpcbox_ymin", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpcbox_ymax", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpcbox_zmin", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpcbox_zmax", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tpcbox_tmin", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tpcbox_tmin_inc", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tpcbox_tmax", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tpcbox_tmax_inc", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tpcbox_srid", + "file": "meos_pointcloud.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_pcid", + "file": "meos_pointcloud.h", + "returnType": { + "c": "uint32_t", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_to_stbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_expand", + "file": "meos_pointcloud.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "TPCBox *", + "canonical": "TPCBox *" + } + ] + }, + { + "name": "tpcbox_round", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpcbox_set_srid", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "union_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "inter_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "result", + "cType": "TPCBox *", + "canonical": "TPCBox *" + } + ] + }, + { + "name": "intersection_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "contains_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "contained_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overlaps_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "same_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "adjacent_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_cmp", + "file": "meos_pointcloud.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_eq", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_ne", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_lt", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_le", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_gt", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpcbox_ge", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "left_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overleft_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "right_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overright_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "below_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overbelow_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "above_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overabove_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "front_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overfront_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "back_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overback_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "before_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overbefore_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "after_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "overafter_tpcbox_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "ensure_same_pcid_tpcbox", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "tpointcloudinst_make", + "file": "meos_pointcloud.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "eintersects_tpcpoint_geo", + "file": "meos_pointcloud.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_tpcpoint_geo", + "file": "meos_pointcloud.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "pose_as_ewkt", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_as_hexwkb", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "pose_as_text", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_as_wkb", + "file": "meos_pose.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "pose_from_wkb", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "pose_from_hexwkb", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pose_in", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pose_out", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_from_geopose", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "json", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "pose_as_geopose", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "conformance", + "cType": "int", + "canonical": "int" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpose_from_geopose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "json", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tpose_as_geopose", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "conformance", + "cType": "int", + "canonical": "int" + }, + { + "name": "precision", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_apply_geo", + "file": "meos_pose.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "body", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpose_apply_geo", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "body", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "pose_copy", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_make_2d", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "theta", + "cType": "double", + "canonical": "double" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "pose_make_3d", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "z", + "cType": "double", + "canonical": "double" + }, + { + "name": "W", + "cType": "double", + "canonical": "double" + }, + { + "name": "X", + "cType": "double", + "canonical": "double" + }, + { + "name": "Y", + "cType": "double", + "canonical": "double" + }, + { + "name": "Z", + "cType": "double", + "canonical": "double" + }, + { + "name": "geodetic", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "pose_make_point2d", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "theta", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "pose_make_point3d", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "W", + "cType": "double", + "canonical": "double" + }, + { + "name": "X", + "cType": "double", + "canonical": "double" + }, + { + "name": "Y", + "cType": "double", + "canonical": "double" + }, + { + "name": "Z", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "pose_to_point", + "file": "meos_pose.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_to_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_hash", + "file": "meos_pose.h", + "returnType": { + "c": "uint32", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_hash_extended", + "file": "meos_pose.h", + "returnType": { + "c": "uint64", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "seed", + "cType": "uint64", + "canonical": "unsigned long" + } + ] + }, + { + "name": "pose_orientation", + "file": "meos_pose.h", + "returnType": { + "c": "double *", + "canonical": "double *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "pose_rotation", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_yaw", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_pitch", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_roll", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_angular_distance", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_normalize", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_round", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "posearr_round", + "file": "meos_pose.h", + "returnType": { + "c": "Pose **", + "canonical": "struct Pose **" + }, + "params": [ + { + "name": "posearr", + "cType": "const Pose **", + "canonical": "const struct Pose **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_set_srid", + "file": "meos_pose.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "pose", + "cType": "Pose *", + "canonical": "struct Pose *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "pose_srid", + "file": "meos_pose.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_transform", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + } + ] + }, + { + "name": "pose_transform_pipeline", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pipelinestr", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "srid", + "cType": "int32_t", + "canonical": "int" + }, + { + "name": "is_forward", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "pose_tstzspan_to_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "pose_timestamptz_to_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "distance_pose_geo", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "distance_pose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "distance_pose_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "pose_cmp", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_eq", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_ge", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_gt", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_le", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_lt", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_ne", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_nsame", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_same", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "poseset_in", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "poseset_out", + "file": "meos_pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "poseset_make", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "values", + "cType": "const Pose **", + "canonical": "const struct Pose **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_to_set", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "poseset_end_value", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "poseset_start_value", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "poseset_value_n", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Pose **", + "canonical": "struct Pose **" + } + ] + }, + { + "name": "poseset_values", + "file": "meos_pose.h", + "returnType": { + "c": "Pose **", + "canonical": "struct Pose **" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "contained_pose_set", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "contains_set_pose", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pose", + "cType": "Pose *", + "canonical": "struct Pose *" + } + ] + }, + { + "name": "intersection_pose_set", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "intersection_set_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "minus_pose_set", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "minus_set_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_union_transfn", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "state", + "cType": "Set *", + "canonical": "Set *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "union_pose_set", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "union_set_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "tpose_from_mfjson", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tpose_in", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tposeinst_make", + "file": "meos_pose.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tpose_from_base_temp", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tposeseq_from_base_tstzset", + "file": "meos_pose.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tposeseq_from_base_tstzspan", + "file": "meos_pose.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tposeseqset_from_base_tstzspanset", + "file": "meos_pose.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tpose_make", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "tpoint", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "tradius", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_to_tpoint", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_end_value", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_points", + "file": "meos_pose.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_rotation", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_yaw", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_pitch", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_roll", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_speed", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_angular_speed", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_start_value", + "file": "meos_pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_trajectory", + "file": "meos_pose.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpose_value_at_timestamptz", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Pose **", + "canonical": "struct Pose **" + } + ] + }, + { + "name": "tpose_value_n", + "file": "meos_pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Pose **", + "canonical": "struct Pose **" + } + ] + }, + { + "name": "tpose_values", + "file": "meos_pose.h", + "returnType": { + "c": "Pose **", + "canonical": "struct Pose **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tpose_at_geom", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpose_at_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tpose_at_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "tpose_minus_geom", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tpose_minus_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "tpose_minus_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdistance_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "tdistance_tpose_geo", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdistance_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_tpose_geo", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "nad_tpose_stbox", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nai_tpose_geo", + "file": "meos_pose.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nai_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "nai_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "shortestline_tpose_geo", + "file": "meos_pose.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "shortestline_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "shortestline_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_pose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "always_eq_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_pose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "always_ne_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_pose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "ever_eq_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_pose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "ever_ne_tpose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_pose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "tne_pose_tpose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tpose_pose", + "file": "meos_pose.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "quadbin_is_valid_index", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "index", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_is_valid_cell", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_tile_to_cell", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "x", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "y", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "z", + "cType": "uint32_t", + "canonical": "unsigned int" + } + ] + }, + { + "name": "quadbin_cell_to_tile", + "file": "meos_quadbin.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "x", + "cType": "uint32_t *", + "canonical": "unsigned int *" + }, + { + "name": "y", + "cType": "uint32_t *", + "canonical": "unsigned int *" + }, + { + "name": "z", + "cType": "uint32_t *", + "canonical": "unsigned int *" + } + ] + }, + { + "name": "quadbin_get_resolution", + "file": "meos_quadbin.h", + "returnType": { + "c": "uint32_t", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_cell_to_parent", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "parent_resolution", + "cType": "uint32_t", + "canonical": "unsigned int" + } + ] + }, + { + "name": "quadbin_cell_to_children", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "children_resolution", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "quadbin_cell_sibling", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "direction", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "quadbin_k_ring", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "k", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "quadbin_point_to_cell", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "longitude", + "cType": "double", + "canonical": "double" + }, + { + "name": "latitude", + "cType": "double", + "canonical": "double" + }, + { + "name": "resolution", + "cType": "uint32_t", + "canonical": "unsigned int" + } + ] + }, + { + "name": "quadbin_cell_to_point", + "file": "meos_quadbin.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "longitude", + "cType": "double *", + "canonical": "double *" + }, + { + "name": "latitude", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "quadbin_cell_to_bounding_box", + "file": "meos_quadbin.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "xmin", + "cType": "double *", + "canonical": "double *" + }, + { + "name": "ymin", + "cType": "double *", + "canonical": "double *" + }, + { + "name": "xmax", + "cType": "double *", + "canonical": "double *" + }, + { + "name": "ymax", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "quadbin_cell_area", + "file": "meos_quadbin.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_index_to_string", + "file": "meos_quadbin.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "index", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_string_to_index", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "quadbin_cell_to_quadkey", + "file": "meos_quadbin.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_parse", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "quadbin_eq", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_ne", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_lt", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_le", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_gt", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_ge", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_cmp", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "b", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_hash", + "file": "meos_quadbin.h", + "returnType": { + "c": "uint32_t", + "canonical": "unsigned int" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "quadbin_grid_disk", + "file": "meos_quadbin.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "origin", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "k", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "quadbin_cell_to_children_set", + "file": "meos_quadbin.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "origin", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "children_resolution", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tquadbin_in", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tquadbininst_in", + "file": "meos_quadbin.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tquadbinseq_in", + "file": "meos_quadbin.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tquadbinseqset_in", + "file": "meos_quadbin.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "tquadbin_make", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "value", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tquadbininst_make", + "file": "meos_quadbin.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "value", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tquadbinseq_make", + "file": "meos_quadbin.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "values", + "cType": "const Quadbin *", + "canonical": "const unsigned long *" + }, + { + "name": "times", + "cType": "const TimestampTz *", + "canonical": "const long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tquadbinseqset_make", + "file": "meos_quadbin.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "const TSequence **", + "canonical": "const TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tquadbin_start_value", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tquadbin_end_value", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tquadbin_value_n", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "Quadbin *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tquadbin_values", + "file": "meos_quadbin.h", + "returnType": { + "c": "Quadbin *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tquadbin_value_at_timestamptz", + "file": "meos_quadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Quadbin *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tbigint_to_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tquadbin_to_tbigint", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_quadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_tquadbin_quadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_ne_quadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tquadbin_quadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_eq_quadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tquadbin_quadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "always_ne_quadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tquadbin_quadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ever_eq_tquadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_tquadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_tquadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_tquadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_quadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_tquadbin_quadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "teq_tquadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_quadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_tquadbin_quadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tne_tquadbin_tquadbin", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tquadbin_cell_to_quadkey", + "file": "meos_quadbin.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "raster_tile_value_quadbin", + "file": "meos_raster.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "pixels", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "width", + "cType": "uint16_t", + "canonical": "unsigned short" + }, + { + "name": "height", + "cType": "uint16_t", + "canonical": "unsigned short" + }, + { + "name": "quadbin", + "cType": "uint64", + "canonical": "unsigned long" + }, + { + "name": "pixtype", + "cType": "MeosPixType", + "canonical": "MeosPixType" + }, + { + "name": "nodata", + "cType": "double", + "canonical": "double" + }, + { + "name": "has_nodata", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "traj", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trajectory_quadbins", + "file": "meos_raster.h", + "returnType": { + "c": "uint64 *", + "canonical": "unsigned long *" + }, + "params": [ + { + "name": "traj", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "zoom", + "cType": "uint32_t", + "canonical": "unsigned int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_out", + "file": "meos_rgeo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometryinst_make", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "geom", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "geo_tpose_to_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_to_tpose", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_to_tpoint", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_to_tgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_end_instant", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_end_sequence", + "file": "meos_rgeo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_end_value", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_geom", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_instant_n", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "trgeometry_instants", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant **", + "canonical": "TInstant **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_points", + "file": "meos_rgeo.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_rotation", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_segments", + "file": "meos_rgeo.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_sequence_n", + "file": "meos_rgeo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "i", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "trgeometry_sequences", + "file": "meos_rgeo.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_start_instant", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_start_sequence", + "file": "meos_rgeo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_start_value", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_value_n", + "file": "meos_rgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "n", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "int **", + "canonical": "int **" + } + ] + }, + { + "name": "trgeometry_traversed_area", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "unary_union", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_centroid", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_convex_hull", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_body_point_trajectory", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "trgeometry_space_boxes", + "file": "meos_rgeo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_space_time_boxes", + "file": "meos_rgeo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "xsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "ysize", + "cType": "double", + "canonical": "double" + }, + { + "name": "zsize", + "cType": "double", + "canonical": "double" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "sorigin", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "bitmatrix", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_stboxes", + "file": "meos_rgeo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_split_n_stboxes", + "file": "meos_rgeo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_split_each_n_stboxes", + "file": "meos_rgeo.h", + "returnType": { + "c": "STBox *", + "canonical": "STBox *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "elem_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_hausdorff_distance", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_frechet_distance", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_dyntimewarp_distance", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_frechet_path", + "file": "meos_rgeo.h", + "returnType": { + "c": "Match *", + "canonical": "Match *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_dyntimewarp_path", + "file": "meos_rgeo.h", + "returnType": { + "c": "Match *", + "canonical": "Match *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "trgeometry_length", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_cumulative_length", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_speed", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_twcentroid", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_append_tinstant", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_append_tsequence", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "Temporal *", + "canonical": "Temporal *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "expand", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_delete_timestamptz", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_delete_tstzset", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_delete_tstzspan", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_delete_tstzspanset", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "connect", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_round", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "trgeometry_set_interp", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "trgeometry_to_tinstant", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeometry_after_timestamptz", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_before_timestamptz", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_restrict_values", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_restrict_timestamptz", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_restrict_tstzset", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_restrict_tstzspan", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_restrict_tstzspanset", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_at_geom", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "trgeometry_minus_geom", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "trgeometry_at_stbox", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeometry_minus_stbox", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdistance_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tdistance_trgeometry_tpoint", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tdistance_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_stbox_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nad_trgeometry_stbox", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "nad_trgeometry_tpoint", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nad_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nai_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "nai_trgeometry_tpoint", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "nai_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "shortestline_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "shortestline_trgeometry_tpoint", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "shortestline_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_eq_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_eq_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "always_ne_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "always_ne_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_eq_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ever_eq_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ever_ne_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ever_ne_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "teq_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "tne_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tne_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "econtains_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acontains_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ecovers_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "acovers_geo_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ecovers_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "acovers_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "edisjoint_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "adisjoint_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "eintersects_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "aintersects_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "etouches_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "atouches_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "edwithin_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adwithin_trgeometry_geo", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "edisjoint_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "adisjoint_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "eintersects_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "aintersects_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "edwithin_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "adwithin_trgeometry_trgeometry", + "file": "meos_rgeo.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "ensure_valid_tnpoint_npoint", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "ensure_valid_tnpoint_npointset", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "ensure_valid_tnpoint_geo", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tnpoint_stbox", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_tnpoint_tnpoint", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tnpointsegm_intersection", + "file": "tnpoint.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "common_rid_tnpoint_npoint", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "common_rid_tnpoint_npointset", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "common_rid_tnpoint_tnpoint", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "npoint_collinear", + "file": "tnpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np1", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np2", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "np3", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "npointsegm_interpolate", + "file": "tnpoint.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "start", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "end", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "ratio", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "npointsegm_locate", + "file": "tnpoint.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "start", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "end", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "value", + "cType": "const Npoint *", + "canonical": "const Npoint *" + } + ] + }, + { + "name": "npointarr_geom", + "file": "tnpoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "points", + "cType": "Npoint **", + "canonical": "Npoint **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "nsegmentarr_geom", + "file": "tnpoint.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "segments", + "cType": "Nsegment **", + "canonical": "Nsegment **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "nsegmentarr_normalize", + "file": "tnpoint.h", + "returnType": { + "c": "Nsegment **", + "canonical": "Nsegment **" + }, + "params": [ + { + "name": "segments", + "cType": "Nsegment **", + "canonical": "Nsegment **" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "npoint_wkt_out", + "file": "tnpoint.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "npoint_set", + "file": "tnpoint.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "pos", + "cType": "double", + "canonical": "double" + }, + { + "name": "np", + "cType": "Npoint *", + "canonical": "Npoint *" + } + ] + }, + { + "name": "nsegment_set", + "file": "tnpoint.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "pos1", + "cType": "double", + "canonical": "double" + }, + { + "name": "pos2", + "cType": "double", + "canonical": "double" + }, + { + "name": "ns", + "cType": "Nsegment *", + "canonical": "Nsegment *" + } + ] + }, + { + "name": "datum_npoint_round", + "file": "tnpoint.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "npoint", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "tnpointinst_tgeompointinst", + "file": "tnpoint.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnpointseq_tgeompointseq_disc", + "file": "tnpoint.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "is", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnpointseq_tgeompointseq_cont", + "file": "tnpoint.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnpointseqset_tgeompointseqset", + "file": "tnpoint.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tgeompointinst_tnpointinst", + "file": "tnpoint.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tgeompointseq_tnpointseq", + "file": "tnpoint.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tgeompointseqset_tnpointseqset", + "file": "tnpoint.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tnpointinst_positions", + "file": "tnpoint.h", + "returnType": { + "c": "Nsegment **", + "canonical": "Nsegment **" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnpointseq_positions", + "file": "tnpoint.h", + "returnType": { + "c": "Nsegment **", + "canonical": "Nsegment **" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnpointseqset_positions", + "file": "tnpoint.h", + "returnType": { + "c": "Nsegment **", + "canonical": "Nsegment **" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnpointinst_route", + "file": "tnpoint.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnpointinst_routes", + "file": "tnpoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnpointseq_disc_routes", + "file": "tnpoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "is", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnpointseq_cont_routes", + "file": "tnpoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnpointseqset_routes", + "file": "tnpoint.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "tnpointseq_linear_positions", + "file": "tnpoint.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tnpoint_restrict_stbox", + "file": "tnpoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnpoint_restrict_npoint", + "file": "tnpoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnpoint_restrict_npointset", + "file": "tnpoint.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "npoint_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "npointarr_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "nsegment_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ns", + "cType": "const Nsegment *", + "canonical": "const Nsegment *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "npoint_timestamptz_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "npoint_tstzspan_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tnpointinst_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tnpointinstarr_set_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tnpointseq_expand_stbox", + "file": "tnpoint_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "datum_npoint_distance", + "file": "tnpoint_distance.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "np1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "np2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "npoint_parse", + "file": "tnpoint_parser.h", + "returnType": { + "c": "Npoint *", + "canonical": "Npoint *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "nsegment_parse", + "file": "tnpoint_parser.h", + "returnType": { + "c": "Nsegment *", + "canonical": "Nsegment *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "contains_rid_tnpoint_bigint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contained_rid_tnpoint_bigint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "same_rid_tnpoint_bigint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "rid", + "cType": "int64", + "canonical": "long" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "overlaps_rid_tnpoint_bigintset", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contains_rid_tnpoint_bigintset", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contained_rid_tnpoint_bigintset", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "same_rid_tnpoint_bigintset", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contains_rid_tnpoint_npoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "contained_rid_npoint_tnpoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "same_rid_tnpoint_npoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "np", + "cType": "const Npoint *", + "canonical": "const Npoint *" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "overlaps_rid_tnpoint_tnpoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contains_rid_tnpoint_tnpoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "contained_rid_tnpoint_tnpoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "same_rid_tnpoint_tnpoint", + "file": "tnpoint_routeops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_same_rid_tnpointinst", + "file": "tnpoint_spatialfuncs.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tnpoint_restrict_geom", + "file": "tnpoint_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "meos_pc_schema_get_srid", + "file": "meos_schema_hook.h", + "returnType": { + "c": "int32_t", + "canonical": "int" + }, + "params": [ + { + "name": "pcid", + "cType": "uint32_t", + "canonical": "unsigned int" + } + ] + }, + { + "name": "ensure_same_pcid_pcpatch", + "file": "pcpatch.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa1", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pa2", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "ensure_valid_pcpatchset_pcpatch", + "file": "pcpatch.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + } + ] + }, + { + "name": "pcpatch_parse", + "file": "pcpatch.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "pcpatch_filter_per_point", + "file": "pcpatch_decompose.h", + "returnType": { + "c": "Pcpatch *", + "canonical": "struct Pcpatch *" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pred", + "cType": "pcpatch_pointpred_fn", + "canonical": "_Bool (*)(const int *, void *)" + }, + { + "name": "extra", + "cType": "void *", + "canonical": "void *" + }, + { + "name": "keep_when_true", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "pcpatch_any_point_matches", + "file": "pcpatch_decompose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pa", + "cType": "const Pcpatch *", + "canonical": "const struct Pcpatch *" + }, + { + "name": "pred", + "cType": "pcpatch_pointpred_fn", + "canonical": "_Bool (*)(const int *, void *)" + }, + { + "name": "extra", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "pcpoint_in_tpcbox", + "file": "pcpatch_decompose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "extra", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "pcpoint_intersects_geometry", + "file": "pcpatch_decompose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "extra", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "ensure_same_pcid_pcpoint", + "file": "pcpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pt1", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + }, + { + "name": "pt2", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "ensure_valid_pcpointset_pcpoint", + "file": "pcpoint.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pt", + "cType": "const Pcpoint *", + "canonical": "const struct Pcpoint *" + } + ] + }, + { + "name": "pcpoint_parse", + "file": "pcpoint.h", + "returnType": { + "c": "Pcpoint *", + "canonical": "struct Pcpoint *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "meos_pc_point_serialize", + "file": "pgsql_compat.h", + "returnType": { + "c": "SERIALIZED_POINT *", + "canonical": "SERIALIZED_POINT *" + }, + "params": [ + { + "name": "pcpt", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "meos_pc_point_deserialize", + "file": "pgsql_compat.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "serpt", + "cType": "const SERIALIZED_POINT *", + "canonical": "const SERIALIZED_POINT *" + }, + { + "name": "schema", + "cType": "const PCSCHEMA *", + "canonical": "const struct PCSCHEMA *" + } + ] + }, + { + "name": "meos_pc_patch_serialized_size", + "file": "pgsql_compat.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "patch", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "meos_pc_patch_serialize", + "file": "pgsql_compat.h", + "returnType": { + "c": "SERIALIZED_PATCH *", + "canonical": "struct SERIALIZED_PATCH *" + }, + "params": [ + { + "name": "patch_in", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "userdata", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "meos_pc_patch_serialize_to_uncompressed", + "file": "pgsql_compat.h", + "returnType": { + "c": "SERIALIZED_PATCH *", + "canonical": "struct SERIALIZED_PATCH *" + }, + "params": [ + { + "name": "patch_in", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "meos_pc_patch_deserialize", + "file": "pgsql_compat.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "serpatch", + "cType": "const SERIALIZED_PATCH *", + "canonical": "const struct SERIALIZED_PATCH *" + }, + { + "name": "schema", + "cType": "const PCSCHEMA *", + "canonical": "const struct PCSCHEMA *" + } + ] + }, + { + "name": "tpointcloudinst_set_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "TPCBox *", + "canonical": "TPCBox *" + } + ] + }, + { + "name": "tpointcloudinstarr_set_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "box", + "cType": "TPCBox *", + "canonical": "TPCBox *" + } + ] + }, + { + "name": "tpointcloudseq_expand_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tpointcloudseqarr_set_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "TPCBox *", + "canonical": "TPCBox *" + } + ] + }, + { + "name": "tpcbox_extent_transfn", + "file": "tpc_boxops.h", + "returnType": { + "c": "TPCBox *", + "canonical": "TPCBox *" + }, + "params": [ + { + "name": "state", + "cType": "TPCBox *", + "canonical": "TPCBox *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "boxop_tpointcloud_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "func", + "cType": "bool (*)(const TPCBox *, const TPCBox *)", + "canonical": "_Bool (*)(const TPCBox *, const TPCBox *)" + }, + { + "name": "inverted", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "boxop_tpointcloud_tpointcloud", + "file": "tpc_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "bool (*)(const TPCBox *, const TPCBox *)", + "canonical": "_Bool (*)(const TPCBox *, const TPCBox *)" + } + ] + }, + { + "name": "tpcbox_set_stbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "src", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "dst", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "nad_tpcbox_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "box1", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "box2", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "nad_tpointcloud_tpcbox", + "file": "tpc_boxops.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + } + ] + }, + { + "name": "nad_tpointcloud_tpointcloud", + "file": "tpc_boxops.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tpcbox_index_leaf_consistent", + "file": "tpcbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "query", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpcbox_gist_inner_consistent", + "file": "tpcbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "query", + "cType": "const TPCBox *", + "canonical": "const TPCBox *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tpcbox_index_recheck", + "file": "tpcbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ensure_valid_pose_geo", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_pose_stbox", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_pose_pose", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "ensure_valid_poseset_pose", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_collinear", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose3", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "posesegm_interpolate", + "file": "pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "start", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "end", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "posesegm_locate", + "file": "pose.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "start", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "end", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "value", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "pose_wkt_out", + "file": "pose.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "extended", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pose_parse", + "file": "pose.h", + "returnType": { + "c": "Pose *", + "canonical": "struct Pose *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "datum_pose_point", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_geopoint", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_rotation", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_yaw", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_pitch", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_roll", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_apply_geo", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "body", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_pose_round", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "pose_distance", + "file": "pose.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "pose1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "pose2", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "pose_set_stbox", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "posearr_set_stbox", + "file": "pose.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "pose_timestamptz_set_stbox", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "pose_tstzspan_set_stbox", + "file": "pose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "p", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "ensure_valid_tpose_geo", + "file": "tpose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + } + ] + }, + { + "name": "ensure_valid_tpose_pose", + "file": "tpose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "ensure_valid_tpose_stbox", + "file": "tpose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_tpose_tpose", + "file": "tpose.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tposesegm_intersection_value", + "file": "tpose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tposesegm_intersection", + "file": "tpose.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tposeinst_set_stbox", + "file": "tpose_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tposeinstarr_set_stbox", + "file": "tpose_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tposeseq_expand_stbox", + "file": "tpose_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tpose_restrict_geom", + "file": "tpose_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const int *", + "canonical": "const int *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tpose_restrict_stbox", + "file": "tpose_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tpose_restrict_elevation", + "file": "tpose_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geo_get_srid", + "file": "postgis_ext_defs.in.h", + "returnType": { + "c": "int32", + "canonical": "int" + }, + "params": [ + { + "name": "g", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + } + ] + }, + { + "name": "ensure_valid_tquadbin_tquadbin", + "file": "tquadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_tquadbin_quadbin", + "file": "tquadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + } + ] + }, + { + "name": "ensure_valid_tquadbin_tgeompoint", + "file": "tquadbin.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "datum2_quadbin_eq", + "file": "tquadbin.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "d2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_quadbin_ne", + "file": "tquadbin.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "d2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "quadbin_set_stbox", + "file": "tquadbin_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "cell", + "cType": "Quadbin", + "canonical": "unsigned long" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "quadbinarr_set_stbox", + "file": "tquadbin_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "const Datum *", + "canonical": "const unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tquadbininst_set_stbox", + "file": "tquadbin_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tquadbininstarr_set_stbox", + "file": "tquadbin_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "tquadbinseq_expand_stbox", + "file": "tquadbin_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "ensure_has_geom", + "file": "trgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_valid_trgeo_geo", + "file": "trgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + } + ] + }, + { + "name": "ensure_valid_trgeo_stbox", + "file": "trgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + } + ] + }, + { + "name": "ensure_valid_trgeo_trgeo", + "file": "trgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "ensure_valid_trgeo_tpoint", + "file": "trgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeo_geom_p", + "file": "trgeo.h", + "returnType": { + "c": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "trgeo_wkt_out", + "file": "trgeo.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "extended", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "geo_tposeinst_to_trgeo", + "file": "trgeo.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "geo_tposeseq_to_trgeo", + "file": "trgeo.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "geo_tposeseqset_to_trgeo", + "file": "trgeo.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "trgeo_value_at_timestamptz", + "file": "trgeo.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "trgeometry_restrict_value", + "file": "trgeo.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoinst_geom_p", + "file": "trgeo_inst.h", + "returnType": { + "c": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "trgeoinst_pose_varsize", + "file": "trgeo_inst.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "trgeoinst_set_pose", + "file": "trgeo_inst.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "TInstant *", + "canonical": "TInstant *" + } + ] + }, + { + "name": "trgeoinst_tposeinst", + "file": "trgeo_inst.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "trgeoinst_make1", + "file": "trgeo_inst.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "trgeoseq_to_tinstant", + "file": "trgeo_inst.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "trgeoseqset_to_tinstant", + "file": "trgeo_inst.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "ts", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "trgeo_restrict_geom", + "file": "trgeo_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeo_restrict_stbox", + "file": "trgeo_spatialfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const STBox *", + "canonical": "const STBox *" + }, + { + "name": "border_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "spatialrel_trgeo_trav_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "varfunc", + "canonical": "unsigned long (*)(unsigned long, ...)" + }, + { + "name": "numparam", + "cType": "int", + "canonical": "int" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_geo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_trgeo_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_contains_trgeo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_geo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_trgeo_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_covers_trgeo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_geo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_trgeo_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_disjoint_trgeo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_geo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_trgeo_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_intersects_trgeo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_geo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_trgeo_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_touches_trgeo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_dwithin_trgeo_geo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "ea_dwithin_trgeo_trgeo", + "file": "trgeo_spatialrels.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "dist", + "cType": "double", + "canonical": "double" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_geom_p", + "file": "trgeo_seq.h", + "returnType": { + "c": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "trgeoseq_pose_varsize", + "file": "trgeo_seq.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "trgeoseq_set_pose", + "file": "trgeo_seq.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + } + ] + }, + { + "name": "trgeoseq_tposeseq", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "trgeoseq_make_valid", + "file": "trgeo_seq.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "linear", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_make1_exp", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_make1", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_make_exp", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_make", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_make_free_exp", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseq_make_free", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoinst_to_tsequence", + "file": "trgeo_seq.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "trgeoseqset_geom_p", + "file": "trgeo_seqset.h", + "returnType": { + "c": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + "params": [ + { + "name": "ts", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "trgeoseqset_tposeseqset", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "trgeoseqset_make1_exp", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseqset_make_exp", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseqset_make", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseqset_make_free", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "trgeoseqset_make_gaps", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "trgeoseqset_to_tsequence", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + } + ] + }, + { + "name": "trgeo_to_tsequence", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp_str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "trgeo_to_tsequenceset", + "file": "trgeo_seqset.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interp_str", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "trgeoinst_set_stbox", + "file": "trgeo_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "trgeoinstarr_static_stbox", + "file": "trgeo_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "trgeoinstarr_rotating_stbox", + "file": "trgeo_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "box", + "cType": "STBox *", + "canonical": "STBox *" + } + ] + }, + { + "name": "trgeoinstarr_compute_bbox", + "file": "trgeo_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "geom", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "box", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "ensure_span_isof_type", + "file": "span.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_span_isof_basetype", + "file": "span.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_same_span_type", + "file": "span.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "ensure_valid_span_span", + "file": "span.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_deserialize", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "lower", + "cType": "SpanBound *", + "canonical": "SpanBound *" + }, + { + "name": "upper", + "cType": "SpanBound *", + "canonical": "SpanBound *" + } + ] + }, + { + "name": "span_bound_cmp", + "file": "span.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "b1", + "cType": "const SpanBound *", + "canonical": "const SpanBound *" + }, + { + "name": "b2", + "cType": "const SpanBound *", + "canonical": "const SpanBound *" + } + ] + }, + { + "name": "span_bound_qsort_cmp", + "file": "span.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "s2", + "cType": "const void *", + "canonical": "const void *" + } + ] + }, + { + "name": "span_lower_cmp", + "file": "span.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_upper_cmp", + "file": "span.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s1", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "s2", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "span_decr_bound", + "file": "span.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "upper", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_incr_bound", + "file": "span.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "upper", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spanarr_normalize", + "file": "span.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "spans", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "sort", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "span_bounds_shift_scale_value", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "lower", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "upper", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "span_bounds_shift_scale_time", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "lower", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "upper", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "floatspan_floor_ceil_iter", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "func", + "cType": "datum_func1", + "canonical": "unsigned long (*)(unsigned long)" + } + ] + }, + { + "name": "numspan_delta_scale_iter", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "origin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "delta", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasdelta", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "scale", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tstzspan_delta_scale_iter", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "origin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "delta", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "scale", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "numspan_shift_scale_iter", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "shift", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "width", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasshift", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "haswidth", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "delta", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "scale", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "tstzspan_shift_scale1", + "file": "span.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "s", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "shift", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "delta", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "scale", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "mi_span_value", + "file": "span.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "dist_double_value_value", + "file": "span.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "trgeo_geom_clip_polygon", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "a2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "pa", + "cType": "const POINTARRAY *", + "canonical": "const POINTARRAY *" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_lwpoly", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "a2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "poly", + "cType": "const LWPOLY *", + "canonical": "const LWPOLY *" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_box", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "a2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_polygon_posed", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "p_a_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "p_b_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "pose1", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pa", + "cType": "const POINTARRAY *", + "canonical": "const POINTARRAY *" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_lwpoly_posed", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "p_a_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "p_b_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "pose1", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "poly", + "cType": "const LWPOLY *", + "canonical": "const LWPOLY *" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_box_posed", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "p_a_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "p_b_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "pose1", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "xmin", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymin", + "cType": "double", + "canonical": "double" + }, + { + "name": "xmax", + "cType": "double", + "canonical": "double" + }, + { + "name": "ymax", + "cType": "double", + "canonical": "double" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_lwgeom", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b1", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "a2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "b2", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "geom", + "cType": "const LWGEOM *", + "canonical": "const LWGEOM *" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_geom_clip_lwgeom_posed", + "file": "trgeo_geom_clip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "p_a_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "p_b_local", + "cType": "const POINT2D *", + "canonical": "const POINT2D *" + }, + { + "name": "pose1", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const struct Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "geom", + "cType": "const LWGEOM *", + "canonical": "const LWGEOM *" + }, + { + "name": "intervals_out", + "cType": "Span **", + "canonical": "Span **" + } + ] + }, + { + "name": "trgeo_parse", + "file": "trgeo_parser.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_same_geom", + "file": "trgeo_utils.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "gs1", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "gs2", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + } + ] + }, + { + "name": "lwgeom_apply_pose", + "file": "trgeo_utils.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "geom", + "cType": "LWGEOM *", + "canonical": "LWGEOM *" + } + ] + }, + { + "name": "geom_apply_pose", + "file": "trgeo_utils.h", + "returnType": { + "c": "GSERIALIZED *", + "canonical": "GSERIALIZED *" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "geom_radius", + "file": "trgeo_utils.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "gs", + "cType": "const GSERIALIZED *", + "canonical": "const GSERIALIZED *" + } + ] + }, + { + "name": "v_clip_tpoly_point", + "file": "trgeo_vclip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "poly", + "cType": "const LWPOLY *", + "canonical": "const LWPOLY *" + }, + { + "name": "point", + "cType": "const LWPOINT *", + "canonical": "const LWPOINT *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "poly_feature", + "cType": "uint32_t *", + "canonical": "unsigned int *" + }, + { + "name": "dist", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "v_clip_tpoly_tpoly", + "file": "trgeo_vclip.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "poly1", + "cType": "const LWPOLY *", + "canonical": "const LWPOLY *" + }, + { + "name": "poly2", + "cType": "const LWPOLY *", + "canonical": "const LWPOLY *" + }, + { + "name": "pose1", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "pose2", + "cType": "const Pose *", + "canonical": "const struct Pose *" + }, + { + "name": "poly1_feature", + "cType": "uint32_t *", + "canonical": "unsigned int *" + }, + { + "name": "poly2_feature", + "cType": "uint32_t *", + "canonical": "unsigned int *" + }, + { + "name": "dist", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "apply_pose_point4d", + "file": "trgeo_vclip.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "p", + "cType": "POINT4D *", + "canonical": "POINT4D *" + }, + { + "name": "pose", + "cType": "const Pose *", + "canonical": "const struct Pose *" + } + ] + }, + { + "name": "tfunc_tinstant", + "file": "lifting.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tsequence", + "file": "lifting.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tsequenceset", + "file": "lifting.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_temporal", + "file": "lifting.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tinstant_base", + "file": "lifting.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tsequence_base", + "file": "lifting.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tsequenceset_base", + "file": "lifting.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_temporal_base", + "file": "lifting.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tinstant_tinstant", + "file": "lifting.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tdiscseq_tdiscseq", + "file": "lifting.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tcontseq_tcontseq", + "file": "lifting.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_tsequenceset_tsequenceset", + "file": "lifting.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "ss1", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ss2", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "tfunc_temporal_temporal", + "file": "lifting.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "eafunc_temporal_base", + "file": "lifting.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "eafunc_temporal_temporal", + "file": "lifting.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "lfunc_set", + "file": "lifting.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "lfinfo", + "cType": "LiftedFunctionInfo *", + "canonical": "LiftedFunctionInfo *" + } + ] + }, + { + "name": "set_out_fn", + "file": "set.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "value_out", + "cType": "outfunc", + "canonical": "char *(*)(unsigned long, MeosType, int)" + } + ] + }, + { + "name": "ensure_set_isof_type", + "file": "set.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "settype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_valid_set_set", + "file": "set.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s1", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "s2", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_find_value", + "file": "set.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "arg1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "loc", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "set_unnest_state_make", + "file": "set.h", + "returnType": { + "c": "SetUnnestState *", + "canonical": "SetUnnestState *" + }, + "params": [ + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "set_unnest_state_next", + "file": "set.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "state", + "cType": "SetUnnestState *", + "canonical": "SetUnnestState *" + } + ] + }, + { + "name": "ensure_same_skiplist_subtype", + "file": "skiplist.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "subtype", + "cType": "uint8", + "canonical": "unsigned char" + } + ] + }, + { + "name": "skiplist_set_extra", + "file": "skiplist.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "data", + "cType": "void *", + "canonical": "void *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "skiplist_headval", + "file": "skiplist.h", + "returnType": { + "c": "void *", + "canonical": "void *" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + } + ] + }, + { + "name": "common_entry_cmp", + "file": "span_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "i1", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "i2", + "cType": "const void *", + "canonical": "const void *" + } + ] + }, + { + "name": "span_index_leaf_consistent", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "span_gist_inner_consistent", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "span_index_recheck", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "span_lower_qsort_cmp", + "file": "span_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "b", + "cType": "const void *", + "canonical": "const void *" + } + ] + }, + { + "name": "span_upper_qsort_cmp", + "file": "span_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "b", + "cType": "const void *", + "canonical": "const void *" + } + ] + }, + { + "name": "getQuadrant2D", + "file": "span_index.h", + "returnType": { + "c": "uint8", + "canonical": "unsigned char" + }, + "params": [ + { + "name": "centroid", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overlap2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "contain2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "left2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overLeft2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "right2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "overRight2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "adjacent2D", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "distance_span_nodespan", + "file": "span_index.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "query", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + } + ] + }, + { + "name": "span_spgist_get_span", + "file": "span_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "result", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "spannode_init", + "file": "span_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "SpanNode *", + "canonical": "SpanNode *" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "spannode_copy", + "file": "span_index.h", + "returnType": { + "c": "SpanNode *", + "canonical": "SpanNode *" + }, + "params": [ + { + "name": "orig", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + } + ] + }, + { + "name": "spannode_quadtree_next", + "file": "span_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "centroid", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "quadrant", + "cType": "uint8", + "canonical": "unsigned char" + }, + { + "name": "next_nodespan", + "cType": "SpanNode *", + "canonical": "SpanNode *" + } + ] + }, + { + "name": "spannode_kdtree_next", + "file": "span_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "const SpanNode *", + "canonical": "const SpanNode *" + }, + { + "name": "centroid", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "node", + "cType": "uint8", + "canonical": "unsigned char" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + }, + { + "name": "next_nodespan", + "cType": "SpanNode *", + "canonical": "SpanNode *" + } + ] + }, + { + "name": "ensure_spanset_isof_type", + "file": "spanset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "spansettype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_same_spanset_type", + "file": "spanset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "ensure_same_spanset_span_type", + "file": "spanset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "ensure_valid_spanset_span", + "file": "spanset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "ensure_valid_spanset_spanset", + "file": "spanset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "ss2", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "spanset_find_value", + "file": "spanset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "v", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "loc", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "datum_and", + "file": "tbool_ops.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_or", + "file": "tbool_ops.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "boolop_tbool_bool", + "file": "tbool_ops.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "b", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "boolop_tbool_tbool", + "file": "tbool_ops.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "ensure_same_dimensionality_tbox", + "file": "tbox.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "set_tbox", + "file": "tbox.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "span_tbox", + "file": "tbox.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tbox_tstzspan", + "file": "tbox.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_intspan", + "file": "tbox.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_floatspan", + "file": "tbox.h", + "returnType": { + "c": "Span *", + "canonical": "Span *" + }, + "params": [ + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_index_leaf_consistent", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbox_gist_inner_consistent", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "key", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tbox_index_recheck", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "strategy", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tboxnode_init", + "file": "tbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "centroid", + "cType": "TBox *", + "canonical": "TBox *" + }, + { + "name": "nodebox", + "cType": "TboxNode *", + "canonical": "TboxNode *" + } + ] + }, + { + "name": "tboxnode_copy", + "file": "tbox_index.h", + "returnType": { + "c": "TboxNode *", + "canonical": "TboxNode *" + }, + "params": [ + { + "name": "box", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + } + ] + }, + { + "name": "getQuadrant4D", + "file": "tbox_index.h", + "returnType": { + "c": "uint8", + "canonical": "unsigned char" + }, + "params": [ + { + "name": "centroid", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "inBox", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tboxnode_quadtree_next", + "file": "tbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "centroid", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "quadrant", + "cType": "uint8", + "canonical": "unsigned char" + }, + { + "name": "next_nodebox", + "cType": "TboxNode *", + "canonical": "TboxNode *" + } + ] + }, + { + "name": "tboxnode_kdtree_next", + "file": "tbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "centroid", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "node", + "cType": "uint8", + "canonical": "unsigned char" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + }, + { + "name": "next_nodebox", + "cType": "TboxNode *", + "canonical": "TboxNode *" + } + ] + }, + { + "name": "overlap4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "contain4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "left4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overLeft4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "right4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overRight4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "before4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overBefore4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "after4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "overAfter4D", + "file": "tbox_index.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "distance_tbox_nodebox", + "file": "tbox_index.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "nodebox", + "cType": "const TboxNode *", + "canonical": "const TboxNode *" + } + ] + }, + { + "name": "tnumber_spgist_get_tbox", + "file": "tbox_index.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "result", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "tbox_xmin_cmp", + "file": "tbox_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_xmax_cmp", + "file": "tbox_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_tmin_cmp", + "file": "tbox_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_tmax_cmp", + "file": "tbox_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "box1", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "box2", + "cType": "const TBox *", + "canonical": "const TBox *" + } + ] + }, + { + "name": "tbox_level_cmp", + "file": "tbox_index.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "centroid", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "query", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "level", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tcellindex_type", + "file": "tcellindex.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "dggs_cellops", + "file": "tcellindex.h", + "returnType": { + "c": "const DggsCellOps *", + "canonical": "const struct DggsCellOps *" + }, + "params": [ + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tcellindex_get_resolution", + "file": "tcellindex.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcellindex_is_valid_cell", + "file": "tcellindex.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcellindex_cell_to_parent", + "file": "tcellindex.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "resolution", + "cType": "int32", + "canonical": "int" + } + ] + }, + { + "name": "tcellindex_cell_to_point", + "file": "tcellindex.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcellindex_cell_to_boundary", + "file": "tcellindex.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "tcellindex_cell_area", + "file": "tcellindex.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + } + ] + }, + { + "name": "datum_min_int32", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_max_int32", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_min_int64", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_max_int64", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_min_float8", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_max_float8", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_sum_int32", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_sum_int64", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_sum_float8", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_min_text", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_max_text", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_sum_double2", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_sum_double3", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_sum_double4", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "temporal_skiplist_common", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "list", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "values", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "upper", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "update", + "cType": "int[32]", + "canonical": "int[32]" + } + ] + }, + { + "name": "temporal_skiplist_merge", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "void **", + "canonical": "void **" + }, + "params": [ + { + "name": "spliced", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "spliced_count", + "cType": "int", + "canonical": "int" + }, + { + "name": "values", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "tofree", + "cType": "void ***", + "canonical": "void ***" + }, + { + "name": "nfree", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tinstant_tagg", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "TInstant **", + "canonical": "TInstant **" + }, + "params": [ + { + "name": "instants1", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count1", + "cType": "int", + "canonical": "int" + }, + { + "name": "instants2", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count2", + "cType": "int", + "canonical": "int" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "tofree", + "cType": "void ***", + "canonical": "void ***" + }, + { + "name": "nfree", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tsequence_tagg", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "sequences1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count1", + "cType": "int", + "canonical": "int" + }, + { + "name": "sequences2", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count2", + "cType": "int", + "canonical": "int" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tcontseq_tagg_transfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "interpoint", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_tagg_combinefn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state1", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "state2", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_tagg_transfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "tinstant_tavg_finalfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tsequence_tavg_finalfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tnumberinst_transform_tavg", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "temporal_transform_tcount", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_transform_tagg", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "Temporal **", + "canonical": "Temporal **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "func", + "cType": "TInstant *(*)(const TInstant *)", + "canonical": "TInstant *(*)(const TInstant *)" + } + ] + }, + { + "name": "tsequenceset_tagg_transfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_tagg_transfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "temporal_tagg_transfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "arg2", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_tagg_transform_transfn", + "file": "temporal_aggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "transform", + "cType": "TInstant *(*)(const TInstant *)", + "canonical": "TInstant *(*)(const TInstant *)" + } + ] + }, + { + "name": "temporal_similarity", + "file": "temporal_analytics.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "simfunc", + "cType": "SimFunc", + "canonical": "SimFunc" + } + ] + }, + { + "name": "temporal_similarity_path", + "file": "temporal_analytics.h", + "returnType": { + "c": "Match *", + "canonical": "Match *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "simfunc", + "cType": "SimFunc", + "canonical": "SimFunc" + } + ] + }, + { + "name": "temporal_bbox_size", + "file": "temporal_boxops.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "tempype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tinstarr_set_bbox", + "file": "temporal_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "bbox", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "tsequence_compute_bbox", + "file": "temporal_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + } + ] + }, + { + "name": "tseqarr_compute_bbox", + "file": "temporal_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "bbox", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "tsequenceset_compute_bbox", + "file": "temporal_boxops.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ss", + "cType": "TSequenceSet *", + "canonical": "TSequenceSet *" + } + ] + }, + { + "name": "boxop_temporal_tstzspan", + "file": "temporal_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "func", + "cType": "bool (*)(const Span *, const Span *)", + "canonical": "_Bool (*)(const Span *, const Span *)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "boxop_temporal_temporal", + "file": "temporal_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "bool (*)(const Span *, const Span *)", + "canonical": "_Bool (*)(const Span *, const Span *)" + } + ] + }, + { + "name": "boxop_tnumber_numspan", + "file": "temporal_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "func", + "cType": "bool (*)(const Span *, const Span *)", + "canonical": "_Bool (*)(const Span *, const Span *)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "boxop_tnumber_tbox", + "file": "temporal_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "func", + "cType": "bool (*)(const TBox *, const TBox *)", + "canonical": "_Bool (*)(const TBox *, const TBox *)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "boxop_tnumber_tnumber", + "file": "temporal_boxops.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "bool (*)(const TBox *, const TBox *)", + "canonical": "_Bool (*)(const TBox *, const TBox *)" + } + ] + }, + { + "name": "eacomp_base_temporal", + "file": "temporal_compops.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "eacomp_temporal_base", + "file": "temporal_compops.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "eacomp_temporal_temporal", + "file": "temporal_compops.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + }, + { + "name": "ever", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcomp_base_temporal", + "file": "temporal_compops.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + } + ] + }, + { + "name": "tcomp_temporal_base", + "file": "temporal_compops.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + } + ] + }, + { + "name": "tcomp_temporal_temporal", + "file": "temporal_compops.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + } + ] + }, + { + "name": "tdiscseq_at_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tdiscseq_restrict_value", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_restrict_values", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_minus_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tdiscseq_restrict_tstzset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_restrict_tstzspanset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcontseq_restrict_value_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tcontseq_delete_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tcontseq_delete_tstzset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tcontseq_delete_tstzspanset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + } + ] + }, + { + "name": "tcontseq_at_tstzset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tcontseq_minus_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tcontseq_minus_tstzset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + } + ] + }, + { + "name": "tcontseq_minus_tstzspan", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tcontseq_restrict_value", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tcontseq_restrict_values", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequence_at_values_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "set", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tnumberseq_cont_restrict_span_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tnumberseq_cont_restrict_spanset_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tsegment_at_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tcontseq_minus_timestamp_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tcontseq_minus_tstzset_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tcontseq_at_tstzspanset1", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tcontseq_minus_tstzspanset_iter", + "file": "temporal_restrict.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tcontseq_at_tstzspan", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + } + ] + }, + { + "name": "tcontseq_at_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tcontseq_restrict_tstzspanset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_value_at_timestamptz", + "file": "temporal_restrict.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "tnumberseq_disc_restrict_span", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseq_disc_restrict_spanset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseq_cont_restrict_span", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "span", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseq_cont_restrict_spanset", + "file": "temporal_restrict.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberseq_cont_twavg", + "file": "temporal_restrict.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "span_num_bins", + "file": "temporal_tile.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "origin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start_bin", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "end_bin", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "temporal_time_bin_init", + "file": "temporal_tile.h", + "returnType": { + "c": "SpanBinState *", + "canonical": "struct SpanBinState *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "nbins", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tbox_tile_state_make", + "file": "temporal_tile.h", + "returnType": { + "c": "TboxGridState *", + "canonical": "struct TboxGridState *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "box", + "cType": "const TBox *", + "canonical": "const TBox *" + }, + { + "name": "vsize", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "xorigin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tbox_tile_state_next", + "file": "temporal_tile.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "state", + "cType": "TboxGridState *", + "canonical": "struct TboxGridState *" + } + ] + }, + { + "name": "tbox_tile_state_set", + "file": "temporal_tile.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "vsize", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "tunits", + "cType": "int64", + "canonical": "long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "interval_units", + "file": "temporal_tile.h", + "returnType": { + "c": "int64", + "canonical": "long" + }, + "params": [ + { + "name": "interval", + "cType": "const Interval *", + "canonical": "const Interval *" + } + ] + }, + { + "name": "timestamptz_bin_start", + "file": "temporal_tile.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "timestamp", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "tunits", + "cType": "int64", + "canonical": "long" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "datum_bin", + "file": "temporal_tile.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "size", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "offset", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tnumber_value_time_tile_init", + "file": "temporal_tile.h", + "returnType": { + "c": "TboxGridState *", + "canonical": "struct TboxGridState *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "vsize", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "duration", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "vorigin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "torigin", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "ntiles", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tbox_tile_state_get", + "file": "temporal_tile.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "state", + "cType": "TboxGridState *", + "canonical": "struct TboxGridState *" + }, + { + "name": "box", + "cType": "TBox *", + "canonical": "TBox *" + } + ] + }, + { + "name": "temporal_transform_wcount", + "file": "temporal_waggfuncs.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interval", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tnumber_transform_wavg", + "file": "temporal_waggfuncs.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interval", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "count", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "temporal_wagg_transfn", + "file": "temporal_waggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interval", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "min", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "crossings", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "temporal_wagg_transform_transfn", + "file": "temporal_waggfuncs.h", + "returnType": { + "c": "SkipList *", + "canonical": "struct SkipList *" + }, + "params": [ + { + "name": "state", + "cType": "SkipList *", + "canonical": "struct SkipList *" + }, + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "interval", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "transform", + "cType": "TSequence **(*)(const Temporal *, const Interval *, int *)", + "canonical": "TSequence **(*)(const Temporal *, const Interval *, int *)" + } + ] + }, + { + "name": "tinstant_set", + "file": "tinstant.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "inst", + "cType": "TInstant *", + "canonical": "TInstant *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tnumberinst_double", + "file": "tinstant.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + } + ] + }, + { + "name": "tinstant_to_string", + "file": "tinstant.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "value_out", + "cType": "outfunc", + "canonical": "char *(*)(unsigned long, MeosType, int)" + } + ] + }, + { + "name": "tinstant_restrict_values_test", + "file": "tinstant.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberinst_restrict_span_test", + "file": "tinstant.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "s", + "cType": "const Span *", + "canonical": "const Span *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tnumberinst_restrict_spanset_test", + "file": "tinstant.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_tstzset_test", + "file": "tinstant.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "s", + "cType": "const Set *", + "canonical": "const Set *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstant_restrict_tstzspanset_test", + "file": "tinstant.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "ss", + "cType": "const SpanSet *", + "canonical": "const SpanSet *" + }, + { + "name": "atfunc", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "intersection_tinstant_tinstant", + "file": "tinstant.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inter1", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "inter2", + "cType": "TInstant **", + "canonical": "TInstant **" + } + ] + }, + { + "name": "_mulmat", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "b", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "c", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "arows", + "cType": "const int", + "canonical": "const int" + }, + { + "name": "acols", + "cType": "const int", + "canonical": "const int" + }, + { + "name": "bcols", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_mulvec", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "x", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "y", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "m", + "cType": "const int", + "canonical": "const int" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_transpose", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "at", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "m", + "cType": "const int", + "canonical": "const int" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_addmat", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "b", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "c", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "m", + "cType": "const int", + "canonical": "const int" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_negate", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "m", + "cType": "const int", + "canonical": "const int" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_addeye", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_choldc1", + "file": "tinyekf_meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "a", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "p", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_choldcsl", + "file": "tinyekf_meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "A", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "a", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "p", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_cholsl", + "file": "tinyekf_meos.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "A", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "a", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "p", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_addvec", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "b", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "c", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "_sub", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "b", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "c", + "cType": "float *", + "canonical": "float *" + }, + { + "name": "n", + "cType": "const int", + "canonical": "const int" + } + ] + }, + { + "name": "invert", + "file": "tinyekf_meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "a", + "cType": "const float *", + "canonical": "const float *" + }, + { + "name": "ainv", + "cType": "float *", + "canonical": "float *" + } + ] + }, + { + "name": "ekf_initialize", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ekf", + "cType": "ekf_t *", + "canonical": "struct ekf_t *" + }, + { + "name": "pdiag", + "cType": "const float", + "canonical": "const float" + } + ] + }, + { + "name": "ekf_predict", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ekf", + "cType": "ekf_t *", + "canonical": "struct ekf_t *" + }, + { + "name": "fx", + "cType": "const float", + "canonical": "const float" + }, + { + "name": "F", + "cType": "const float", + "canonical": "const float" + }, + { + "name": "Q", + "cType": "const float", + "canonical": "const float" + } + ] + }, + { + "name": "ekf_update_step3", + "file": "tinyekf_meos.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "ekf", + "cType": "ekf_t *", + "canonical": "struct ekf_t *" + }, + { + "name": "GH", + "cType": "float", + "canonical": "float" + } + ] + }, + { + "name": "ekf_update", + "file": "tinyekf_meos.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ekf", + "cType": "ekf_t *", + "canonical": "struct ekf_t *" + }, + { + "name": "z", + "cType": "const float", + "canonical": "const float" + }, + { + "name": "hx", + "cType": "const float", + "canonical": "const float" + }, + { + "name": "H", + "cType": "const float", + "canonical": "const float" + }, + { + "name": "R", + "cType": "const float", + "canonical": "const float" + } + ] + }, + { + "name": "tfloat_arithop_turnpt", + "file": "tnumber_mathfuncs.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "param", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "arithop_tnumber_number", + "file": "tnumber_mathfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "oper", + "cType": "TArithmetic", + "canonical": "TArithmetic" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "arithop_tnumber_tnumber", + "file": "tnumber_mathfuncs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "oper", + "cType": "TArithmetic", + "canonical": "TArithmetic" + }, + { + "name": "func", + "cType": "Datum (*)(Datum, Datum, MeosType)", + "canonical": "unsigned long (*)(unsigned long, unsigned long, MeosType)" + }, + { + "name": "tpfunc", + "cType": "tpfunc_temp", + "canonical": "int (*)(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, long, long, long *, long *)" + } + ] + }, + { + "name": "float_collinear", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "x1", + "cType": "double", + "canonical": "double" + }, + { + "name": "x2", + "cType": "double", + "canonical": "double" + }, + { + "name": "x3", + "cType": "double", + "canonical": "double" + }, + { + "name": "ratio", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "floatsegm_interpolate", + "file": "tsequence.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "value1", + "cType": "double", + "canonical": "double" + }, + { + "name": "value2", + "cType": "double", + "canonical": "double" + }, + { + "name": "value", + "cType": "long double", + "canonical": "long double" + } + ] + }, + { + "name": "floatsegm_locate", + "file": "tsequence.h", + "returnType": { + "c": "long double", + "canonical": "long double" + }, + "params": [ + { + "name": "value1", + "cType": "double", + "canonical": "double" + }, + { + "name": "value2", + "cType": "double", + "canonical": "double" + }, + { + "name": "value", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tnumbersegm_intersection", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tsequence_norm_test", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "value1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value3", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "t1", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t2", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t3", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tsequence_join_test", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "removelast", + "cType": "bool *", + "canonical": "_Bool *" + }, + { + "name": "removefirst", + "cType": "bool *", + "canonical": "_Bool *" + } + ] + }, + { + "name": "tsequence_join", + "file": "tsequence.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "removelast", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "removefirst", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tinstarr_normalize", + "file": "tsequence.h", + "returnType": { + "c": "TInstant **", + "canonical": "TInstant **" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tcontseq_find_timestamptz", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tdiscseq_find_timestamptz", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "tseqarr2_to_tseqarr", + "file": "tsequence.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence ***", + "canonical": "TSequence ***" + }, + { + "name": "countseqs", + "cType": "int *", + "canonical": "int *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "totalseqs", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "ensure_valid_tinstarr_common", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequence_make_exp1", + "file": "tsequence.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "maxcount", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "normalize", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "bbox", + "cType": "void *", + "canonical": "void *" + } + ] + }, + { + "name": "synchronize_tsequence_tsequence", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "sync1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "sync2", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "interpoint", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tfloatsegm_intersection_value", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tsegment_intersection_value", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tsegment_intersection", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "start1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "start2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t1", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "t2", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tsegment_value_at_timestamptz", + "file": "tsequence.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "start", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "end", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "lower", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "upper", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + } + ] + }, + { + "name": "intersection_tdiscseq_tdiscseq", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inter1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "inter2", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "intersection_tcontseq_tdiscseq", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq1", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inter1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "inter2", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "intersection_tdiscseq_tcontseq", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "is", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "seq2", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inter1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "inter2", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "intersection_tsequence_tinstant", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inter1", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "inter2", + "cType": "TInstant **", + "canonical": "TInstant **" + } + ] + }, + { + "name": "intersection_tinstant_tsequence", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inter1", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "inter2", + "cType": "TInstant **", + "canonical": "TInstant **" + } + ] + }, + { + "name": "tsequence_to_string", + "file": "tsequence.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "component", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "value_out", + "cType": "outfunc", + "canonical": "char *(*)(unsigned long, MeosType, int)" + } + ] + }, + { + "name": "ensure_increasing_timestamps", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst1", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inst2", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "strict", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "bbox_expand", + "file": "tsequence.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "box1", + "cType": "const void *", + "canonical": "const void *" + }, + { + "name": "box2", + "cType": "void *", + "canonical": "void *" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_valid_tinstarr", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "merge", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tsequence_make_valid", + "file": "tsequence.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "lower_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "upper_inc", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "tnumberseq_shift_scale_value_iter", + "file": "tsequence.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "origin", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "delta", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "hasdelta", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "scale", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tsequence_shift_scale_time_iter", + "file": "tsequence.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "seq", + "cType": "TSequence *", + "canonical": "TSequence *" + }, + { + "name": "delta", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "scale", + "cType": "double", + "canonical": "double" + } + ] + }, + { + "name": "tstepseq_to_linear_iter", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tstepseq_to_linear", + "file": "tsequence.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + } + ] + }, + { + "name": "tsequence_segments_iter", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "result", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "tsequence_timestamps_iter", + "file": "tsequence.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "result", + "cType": "TimestampTz *", + "canonical": "long *" + } + ] + }, + { + "name": "tsequenceset_find_timestamptz", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "t", + "cType": "TimestampTz", + "canonical": "long" + }, + { + "name": "loc", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "tseqarr_normalize", + "file": "tsequenceset.h", + "returnType": { + "c": "TSequence **", + "canonical": "TSequence **" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "newcount", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "datum_distance", + "file": "tsequenceset.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "value1", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "value2", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "flags", + "cType": "int16", + "canonical": "short" + } + ] + }, + { + "name": "ensure_valid_tinstarr_gaps", + "file": "tsequenceset.h", + "returnType": { + "c": "int *", + "canonical": "int *" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "merge", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "maxdist", + "cType": "double", + "canonical": "double" + }, + { + "name": "maxt", + "cType": "const Interval *", + "canonical": "const Interval *" + }, + { + "name": "nsplits", + "cType": "int *", + "canonical": "int *" + } + ] + }, + { + "name": "ensure_valid_tseqarr", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "synchronize_tsequenceset_tsequence", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "mode", + "cType": "SyncMode", + "canonical": "SyncMode" + }, + { + "name": "inter1", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + }, + { + "name": "inter2", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + } + ] + }, + { + "name": "synchronize_tsequenceset_tsequenceset", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss1", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "ss2", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "mode", + "cType": "SyncMode", + "canonical": "SyncMode" + }, + { + "name": "inter1", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + }, + { + "name": "inter2", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + } + ] + }, + { + "name": "intersection_tsequenceset_tinstant", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "inter1", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "inter2", + "cType": "TInstant **", + "canonical": "TInstant **" + } + ] + }, + { + "name": "intersection_tinstant_tsequenceset", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "inst", + "cType": "const TInstant *", + "canonical": "const TInstant *" + }, + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "inter1", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "inter2", + "cType": "TInstant **", + "canonical": "TInstant **" + } + ] + }, + { + "name": "intersection_tsequenceset_tdiscseq", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "is", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "inter1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "inter2", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "intersection_tdiscseq_tsequenceset", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "is", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "inter1", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "inter2", + "cType": "TSequence **", + "canonical": "TSequence **" + } + ] + }, + { + "name": "intersection_tsequence_tsequenceset", + "file": "tsequenceset.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "seq", + "cType": "const TSequence *", + "canonical": "const TSequence *" + }, + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "mode", + "cType": "SyncMode", + "canonical": "SyncMode" + }, + { + "name": "inter1", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + }, + { + "name": "inter2", + "cType": "TSequenceSet **", + "canonical": "TSequenceSet **" + } + ] + }, + { + "name": "tsequenceset_to_string", + "file": "tsequenceset.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "ss", + "cType": "const TSequenceSet *", + "canonical": "const TSequenceSet *" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + }, + { + "name": "value_out", + "cType": "outfunc", + "canonical": "char *(*)(unsigned long, MeosType, int)" + } + ] + }, + { + "name": "datum_textcat", + "file": "ttext_funcs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_lower", + "file": "ttext_funcs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_upper", + "file": "ttext_funcs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "datum_initcap", + "file": "ttext_funcs.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + } + ] + }, + { + "name": "textfunc_ttext", + "file": "ttext_funcs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "datum_func1", + "canonical": "unsigned long (*)(unsigned long)" + } + ] + }, + { + "name": "textfunc_ttext_text", + "file": "ttext_funcs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + }, + { + "name": "invert", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "textfunc_ttext_ttext", + "file": "ttext_funcs.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "temp1", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "temp2", + "cType": "const Temporal *", + "canonical": "const Temporal *" + }, + { + "name": "func", + "cType": "datum_func2", + "canonical": "unsigned long (*)(unsigned long, unsigned long)" + } + ] + }, + { + "name": "datum_as_wkb", + "file": "type_inout.h", + "returnType": { + "c": "uint8_t *", + "canonical": "unsigned char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size_out", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "datum_as_hexwkb", + "file": "type_inout.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "variant", + "cType": "uint8_t", + "canonical": "unsigned char" + }, + { + "name": "size", + "cType": "size_t *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "type_from_wkb", + "file": "type_inout.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "type_from_hexwkb", + "file": "type_inout.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "hexwkb", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "ensure_end_input", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "type", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "p_whitespace", + "file": "type_parser.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "p_delimchar", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "delim", + "cType": "char", + "canonical": "char" + } + ] + }, + { + "name": "p_obrace", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "ensure_obrace", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "type", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "p_cbrace", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "ensure_cbrace", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "type", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "p_obracket", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "p_cbracket", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "p_oparen", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "ensure_oparen", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "type", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "p_cparen", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "ensure_cparen", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "type", + "cType": "const char *", + "canonical": "const char *" + } + ] + }, + { + "name": "p_comma", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "basetype_parse", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "basetypid", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "delim", + "cType": "char", + "canonical": "char" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "double_parse", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "result", + "cType": "double *", + "canonical": "double *" + } + ] + }, + { + "name": "elem_parse", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "set_parse", + "file": "type_parser.h", + "returnType": { + "c": "Set *", + "canonical": "Set *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "span_parse", + "file": "type_parser.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "span", + "cType": "Span *", + "canonical": "Span *" + } + ] + }, + { + "name": "spanset_parse", + "file": "type_parser.h", + "returnType": { + "c": "SpanSet *", + "canonical": "SpanSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "spantype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tbox_parse", + "file": "type_parser.h", + "returnType": { + "c": "TBox *", + "canonical": "TBox *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "timestamp_parse", + "file": "type_parser.h", + "returnType": { + "c": "TimestampTz", + "canonical": "long" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + } + ] + }, + { + "name": "tinstant_parse", + "file": "type_parser.h", + "returnType": { + "c": "TInstant *", + "canonical": "TInstant *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tdiscseq_parse", + "file": "type_parser.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tcontseq_parse", + "file": "type_parser.h", + "returnType": { + "c": "TSequence *", + "canonical": "TSequence *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "tsequenceset_parse", + "file": "type_parser.h", + "returnType": { + "c": "TSequenceSet *", + "canonical": "TSequenceSet *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "interp", + "cType": "interpType", + "canonical": "interpType" + } + ] + }, + { + "name": "temporal_parse", + "file": "type_parser.h", + "returnType": { + "c": "Temporal *", + "canonical": "Temporal *" + }, + "params": [ + { + "name": "str", + "cType": "const char **", + "canonical": "const char **" + }, + { + "name": "temptype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_copy", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "typid", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_double", + "file": "type_util.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "d", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "double_datum", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "d", + "cType": "double", + "canonical": "double" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "bstring2bytea", + "file": "type_util.h", + "returnType": { + "c": "bytea *", + "canonical": "struct varlena *" + }, + "params": [ + { + "name": "wkb", + "cType": "const uint8_t *", + "canonical": "const unsigned char *" + }, + { + "name": "size", + "cType": "size_t", + "canonical": "unsigned long" + } + ] + }, + { + "name": "basetype_in", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "end", + "cType": "bool", + "canonical": "bool" + }, + { + "name": "result", + "cType": "Datum *", + "canonical": "unsigned long *" + } + ] + }, + { + "name": "basetype_out", + "file": "type_util.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "value", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + }, + { + "name": "maxdd", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "pfree_array", + "file": "type_util.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "array", + "cType": "void **", + "canonical": "void **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "string_escape", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "quotes", + "cType": "int", + "canonical": "int" + }, + { + "name": "result", + "cType": "char **", + "canonical": "char **" + } + ] + }, + { + "name": "string_unescape", + "file": "type_util.h", + "returnType": { + "c": "size_t", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "str", + "cType": "const char *", + "canonical": "const char *" + }, + { + "name": "result", + "cType": "char **", + "canonical": "char **" + } + ] + }, + { + "name": "stringarr_to_string", + "file": "type_util.h", + "returnType": { + "c": "char *", + "canonical": "char *" + }, + "params": [ + { + "name": "strings", + "cType": "char **", + "canonical": "char **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "prefix", + "cType": "char *", + "canonical": "char *" + }, + { + "name": "open", + "cType": "char", + "canonical": "char" + }, + { + "name": "close", + "cType": "char", + "canonical": "char" + }, + { + "name": "quotes", + "cType": "int", + "canonical": "int" + }, + { + "name": "spaces", + "cType": "bool", + "canonical": "bool" + } + ] + }, + { + "name": "datumarr_sort", + "file": "type_util.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "values", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tstzarr_sort", + "file": "type_util.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "times", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "spanarr_sort", + "file": "type_util.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "spans", + "cType": "Span *", + "canonical": "Span *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tinstarr_sort", + "file": "type_util.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tseqarr_sort", + "file": "type_util.h", + "returnType": { + "c": "void", + "canonical": "void" + }, + "params": [ + { + "name": "sequences", + "cType": "TSequence **", + "canonical": "TSequence **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "datumarr_remove_duplicates", + "file": "type_util.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "values", + "cType": "Datum *", + "canonical": "unsigned long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + }, + { + "name": "basetype", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "tstzarr_remove_duplicates", + "file": "type_util.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "values", + "cType": "TimestampTz *", + "canonical": "long *" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "tinstarr_remove_duplicates", + "file": "type_util.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "instants", + "cType": "TInstant **", + "canonical": "TInstant **" + }, + { + "name": "count", + "cType": "int", + "canonical": "int" + } + ] + }, + { + "name": "datum_add", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_sub", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_mul", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_div", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_cmp", + "file": "type_util.h", + "returnType": { + "c": "int", + "canonical": "int" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_eq", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_ne", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_lt", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_le", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_gt", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum_ge", + "file": "type_util.h", + "returnType": { + "c": "bool", + "canonical": "bool" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_eq", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_ne", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_lt", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_le", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_gt", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "datum2_ge", + "file": "type_util.h", + "returnType": { + "c": "Datum", + "canonical": "unsigned long" + }, + "params": [ + { + "name": "l", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "r", + "cType": "Datum", + "canonical": "unsigned long" + }, + { + "name": "type", + "cType": "MeosType", + "canonical": "MeosType" + } + ] + }, + { + "name": "hypot3d", + "file": "type_util.h", + "returnType": { + "c": "double", + "canonical": "double" + }, + "params": [ + { + "name": "x", + "cType": "double", + "canonical": "double" + }, + { + "name": "y", + "cType": "double", + "canonical": "double" + }, + { + "name": "z", + "cType": "double", + "canonical": "double" + } + ] + } + ], + "structs": [ + { + "name": "Set", + "file": "meos.h", + "fields": [ + { + "name": "vl_len_", + "cType": "int32", + "offset_bits": 0 + }, + { + "name": "settype", + "cType": "uint8", + "offset_bits": 32 + }, + { + "name": "basetype", + "cType": "uint8", + "offset_bits": 40 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 48 + }, + { + "name": "count", + "cType": "int32", + "offset_bits": 64 + }, + { + "name": "maxcount", + "cType": "int32", + "offset_bits": 96 + }, + { + "name": "bboxsize", + "cType": "int16", + "offset_bits": 128 + } + ] + }, + { + "name": "Span", + "file": "meos.h", + "fields": [ + { + "name": "spantype", + "cType": "uint8", + "offset_bits": 0 + }, + { + "name": "basetype", + "cType": "uint8", + "offset_bits": 8 + }, + { + "name": "lower_inc", + "cType": "_Bool", + "offset_bits": 16 + }, + { + "name": "upper_inc", + "cType": "_Bool", + "offset_bits": 24 + }, + { + "name": "padding", + "cType": "char[4]", + "offset_bits": 32 + }, + { + "name": "lower", + "cType": "Datum", + "offset_bits": 64 + }, + { + "name": "upper", + "cType": "Datum", + "offset_bits": 128 + } + ] + }, + { + "name": "SpanSet", + "file": "meos.h", + "fields": [ + { + "name": "vl_len_", + "cType": "int32", + "offset_bits": 0 + }, + { + "name": "spansettype", + "cType": "uint8", + "offset_bits": 32 + }, + { + "name": "spantype", + "cType": "uint8", + "offset_bits": 40 + }, + { + "name": "basetype", + "cType": "uint8", + "offset_bits": 48 + }, + { + "name": "padding", + "cType": "char", + "offset_bits": 56 + }, + { + "name": "count", + "cType": "int32", + "offset_bits": 64 + }, + { + "name": "maxcount", + "cType": "int32", + "offset_bits": 96 + }, + { + "name": "span", + "cType": "Span", + "offset_bits": 128 + }, + { + "name": "elems", + "cType": "Span[1]", + "offset_bits": 320 + } + ] + }, + { + "name": "TBox", + "file": "meos.h", + "fields": [ + { + "name": "period", + "cType": "Span", + "offset_bits": 0 + }, + { + "name": "span", + "cType": "Span", + "offset_bits": 192 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 384 + } + ] + }, + { + "name": "STBox", + "file": "meos.h", + "fields": [ + { + "name": "period", + "cType": "Span", + "offset_bits": 0 + }, + { + "name": "xmin", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "ymin", + "cType": "double", + "offset_bits": 256 + }, + { + "name": "zmin", + "cType": "double", + "offset_bits": 320 + }, + { + "name": "xmax", + "cType": "double", + "offset_bits": 384 + }, + { + "name": "ymax", + "cType": "double", + "offset_bits": 448 + }, + { + "name": "zmax", + "cType": "double", + "offset_bits": 512 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 576 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 608 + } + ] + }, + { + "name": "Temporal", + "file": "meos.h", + "fields": [ + { + "name": "vl_len_", + "cType": "int32", + "offset_bits": 0 + }, + { + "name": "temptype", + "cType": "uint8", + "offset_bits": 32 + }, + { + "name": "subtype", + "cType": "uint8", + "offset_bits": 40 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 48 + } + ] + }, + { + "name": "TInstant", + "file": "meos.h", + "fields": [ + { + "name": "vl_len_", + "cType": "int32", + "offset_bits": 0 + }, + { + "name": "temptype", + "cType": "uint8", + "offset_bits": 32 + }, + { + "name": "subtype", + "cType": "uint8", + "offset_bits": 40 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 48 + }, + { + "name": "t", + "cType": "TimestampTz", + "offset_bits": 64 + }, + { + "name": "value", + "cType": "Datum", + "offset_bits": 128 + } + ], + "meosType": "TPointInst" + }, + { + "name": "TSequence", + "file": "meos.h", + "fields": [ + { + "name": "vl_len_", + "cType": "int32", + "offset_bits": 0 + }, + { + "name": "temptype", + "cType": "uint8", + "offset_bits": 32 + }, + { + "name": "subtype", + "cType": "uint8", + "offset_bits": 40 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 48 + }, + { + "name": "count", + "cType": "int32", + "offset_bits": 64 + }, + { + "name": "maxcount", + "cType": "int32", + "offset_bits": 96 + }, + { + "name": "bboxsize", + "cType": "int16", + "offset_bits": 128 + }, + { + "name": "padding", + "cType": "char[6]", + "offset_bits": 144 + }, + { + "name": "period", + "cType": "Span", + "offset_bits": 192 + } + ], + "meosType": "TPointSeq" + }, + { + "name": "TSequenceSet", + "file": "meos.h", + "fields": [ + { + "name": "vl_len_", + "cType": "int32", + "offset_bits": 0 + }, + { + "name": "temptype", + "cType": "uint8", + "offset_bits": 32 + }, + { + "name": "subtype", + "cType": "uint8", + "offset_bits": 40 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 48 + }, + { + "name": "count", + "cType": "int32", + "offset_bits": 64 + }, + { + "name": "totalcount", + "cType": "int32", + "offset_bits": 96 + }, + { + "name": "maxcount", + "cType": "int32", + "offset_bits": 128 + }, + { + "name": "bboxsize", + "cType": "int16", + "offset_bits": 160 + }, + { + "name": "padding", + "cType": "int16", + "offset_bits": 176 + }, + { + "name": "period", + "cType": "Span", + "offset_bits": 192 + } + ] + }, + { + "name": "Match", + "file": "meos.h", + "fields": [ + { + "name": "i", + "cType": "int", + "offset_bits": 0 + }, + { + "name": "j", + "cType": "int", + "offset_bits": 32 + } + ] + }, + { + "name": "SkipList", + "file": "meos.h", + "fields": [] + }, + { + "name": "MeosArray", + "file": "meos.h", + "fields": [] + }, + { + "name": "RTree", + "file": "meos.h", + "fields": [] + }, + { + "name": "MvtGeom", + "file": "meos_geo.h", + "fields": [ + { + "name": "geom", + "cType": "int *", + "offset_bits": -1 + }, + { + "name": "times", + "cType": "int64 *", + "offset_bits": -1 + }, + { + "name": "count", + "cType": "int", + "offset_bits": -1 + } + ] + }, + { + "name": "SpaceSplit", + "file": "meos_geo.h", + "fields": [ + { + "name": "fragments", + "cType": "Temporal **", + "offset_bits": -1 + }, + { + "name": "bins", + "cType": "int **", + "offset_bits": -1 + }, + { + "name": "count", + "cType": "int", + "offset_bits": -1 + } + ] + }, + { + "name": "SpaceTimeSplit", + "file": "meos_geo.h", + "fields": [ + { + "name": "fragments", + "cType": "Temporal **", + "offset_bits": -1 + }, + { + "name": "space_bins", + "cType": "int **", + "offset_bits": -1 + }, + { + "name": "time_bins", + "cType": "TimestampTz *", + "offset_bits": -1 + }, + { + "name": "count", + "cType": "int", + "offset_bits": -1 + } + ] + }, + { + "name": "Cbuffer", + "file": "meos_cbuffer.h", + "fields": [] + }, + { + "name": "temptype_catalog_struct", + "file": "meos_catalog.h", + "fields": [ + { + "name": "temptype", + "cType": "MeosType", + "offset_bits": 0 + }, + { + "name": "basetype", + "cType": "MeosType", + "offset_bits": 32 + } + ] + }, + { + "name": "settype_catalog_struct", + "file": "meos_catalog.h", + "fields": [ + { + "name": "settype", + "cType": "MeosType", + "offset_bits": 0 + }, + { + "name": "basetype", + "cType": "MeosType", + "offset_bits": 32 + } + ] + }, + { + "name": "spantype_catalog_struct", + "file": "meos_catalog.h", + "fields": [ + { + "name": "spantype", + "cType": "MeosType", + "offset_bits": 0 + }, + { + "name": "basetype", + "cType": "MeosType", + "offset_bits": 32 + } + ] + }, + { + "name": "spansettype_catalog_struct", + "file": "meos_catalog.h", + "fields": [ + { + "name": "spansettype", + "cType": "MeosType", + "offset_bits": 0 + }, + { + "name": "spantype", + "cType": "MeosType", + "offset_bits": 32 + } + ] + }, + { + "name": "SkipListElem", + "file": "meos_internal.h", + "fields": [ + { + "name": "key", + "cType": "void *", + "offset_bits": 0 + }, + { + "name": "value", + "cType": "void *", + "offset_bits": 64 + }, + { + "name": "height", + "cType": "int", + "offset_bits": 128 + }, + { + "name": "next", + "cType": "int[32]", + "offset_bits": 160 + } + ] + }, + { + "name": "double2", + "file": "doublen.h", + "fields": [ + { + "name": "a", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "b", + "cType": "double", + "offset_bits": 64 + } + ] + }, + { + "name": "double3", + "file": "doublen.h", + "fields": [ + { + "name": "a", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "b", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "c", + "cType": "double", + "offset_bits": 128 + } + ] + }, + { + "name": "double4", + "file": "doublen.h", + "fields": [ + { + "name": "a", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "b", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "c", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "d", + "cType": "double", + "offset_bits": 192 + } + ] + }, + { + "name": "STboxNode", + "file": "stbox_index.h", + "fields": [ + { + "name": "left", + "cType": "STBox", + "offset_bits": 0 + }, + { + "name": "right", + "cType": "STBox", + "offset_bits": 640 + } + ] + }, + { + "name": "SortedSTbox", + "file": "stbox_index.h", + "fields": [ + { + "name": "box", + "cType": "STBox", + "offset_bits": 0 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 640 + } + ] + }, + { + "name": "GeoAggregateState", + "file": "tgeo_aggfuncs.h", + "fields": [ + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 0 + }, + { + "name": "hasz", + "cType": "_Bool", + "offset_bits": 32 + } + ] + }, + { + "name": "BitMatrix", + "file": "tgeo_tile.h", + "fields": [ + { + "name": "ndims", + "cType": "int", + "offset_bits": 0 + }, + { + "name": "count", + "cType": "int[4]", + "offset_bits": 32 + }, + { + "name": "byte", + "cType": "uint8_t[1]", + "offset_bits": 160 + } + ] + }, + { + "name": "STboxGridState", + "file": "tgeo_tile.h", + "fields": [ + { + "name": "done", + "cType": "_Bool", + "offset_bits": 0 + }, + { + "name": "hasx", + "cType": "_Bool", + "offset_bits": 8 + }, + { + "name": "hasz", + "cType": "_Bool", + "offset_bits": 16 + }, + { + "name": "hast", + "cType": "_Bool", + "offset_bits": 24 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 32 + }, + { + "name": "xsize", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "ysize", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "zsize", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "tunits", + "cType": "int64", + "offset_bits": 256 + }, + { + "name": "box", + "cType": "STBox", + "offset_bits": 320 + }, + { + "name": "temp", + "cType": "const Temporal *", + "offset_bits": 960 + }, + { + "name": "bm", + "cType": "BitMatrix *", + "offset_bits": 1024 + }, + { + "name": "x", + "cType": "double", + "offset_bits": 1088 + }, + { + "name": "y", + "cType": "double", + "offset_bits": 1152 + }, + { + "name": "z", + "cType": "double", + "offset_bits": 1216 + }, + { + "name": "t", + "cType": "TimestampTz", + "offset_bits": 1280 + }, + { + "name": "ntiles", + "cType": "int", + "offset_bits": 1344 + }, + { + "name": "max_coords", + "cType": "int[4]", + "offset_bits": 1376 + }, + { + "name": "coords", + "cType": "int[4]", + "offset_bits": 1504 + } + ] + }, + { + "name": "ArrowSchema", + "file": "meos_arrow.h", + "fields": [] + }, + { + "name": "ArrowArray", + "file": "meos_arrow.h", + "fields": [] + }, + { + "name": "Npoint", + "file": "meos_npoint.h", + "fields": [ + { + "name": "rid", + "cType": "int64", + "offset_bits": 0 + }, + { + "name": "pos", + "cType": "double", + "offset_bits": 64 + } + ] + }, + { + "name": "Nsegment", + "file": "meos_npoint.h", + "fields": [ + { + "name": "rid", + "cType": "int64", + "offset_bits": 0 + }, + { + "name": "pos1", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "pos2", + "cType": "double", + "offset_bits": 128 + } + ] + }, + { + "name": "Pcpoint", + "file": "meos_pointcloud.h", + "fields": [] + }, + { + "name": "Pcpatch", + "file": "meos_pointcloud.h", + "fields": [] + }, + { + "name": "PCSCHEMA", + "file": "meos_pointcloud.h", + "fields": [] + }, + { + "name": "TPCBox", + "file": "meos_pointcloud.h", + "fields": [ + { + "name": "period", + "cType": "Span", + "offset_bits": 0 + }, + { + "name": "xmin", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "ymin", + "cType": "double", + "offset_bits": 256 + }, + { + "name": "zmin", + "cType": "double", + "offset_bits": 320 + }, + { + "name": "xmax", + "cType": "double", + "offset_bits": 384 + }, + { + "name": "ymax", + "cType": "double", + "offset_bits": 448 + }, + { + "name": "zmax", + "cType": "double", + "offset_bits": 512 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 576 + }, + { + "name": "pcid", + "cType": "uint32_t", + "offset_bits": 608 + }, + { + "name": "flags", + "cType": "int16", + "offset_bits": 640 + }, + { + "name": "padding", + "cType": "char[6]", + "offset_bits": 656 + } + ] + }, + { + "name": "Pose", + "file": "meos_pose.h", + "fields": [] + }, + { + "name": "PcpointInTpcboxArgs", + "file": "pcpatch_decompose.h", + "fields": [ + { + "name": "box", + "cType": "const TPCBox *", + "offset_bits": 0 + }, + { + "name": "border_inc", + "cType": "_Bool", + "offset_bits": 64 + } + ] + }, + { + "name": "SERIALIZED_POINT", + "file": "pgsql_compat.h", + "fields": [ + { + "name": "size", + "cType": "uint32_t", + "offset_bits": 0 + }, + { + "name": "pcid", + "cType": "uint32_t", + "offset_bits": 32 + }, + { + "name": "data", + "cType": "uint8_t[1]", + "offset_bits": 64 + } + ] + }, + { + "name": "SERIALIZED_PATCH", + "file": "pgsql_compat.h", + "fields": [ + { + "name": "size", + "cType": "uint32_t", + "offset_bits": -1 + }, + { + "name": "pcid", + "cType": "uint32_t", + "offset_bits": -1 + }, + { + "name": "compression", + "cType": "uint32_t", + "offset_bits": -1 + }, + { + "name": "npoints", + "cType": "uint32_t", + "offset_bits": -1 + }, + { + "name": "bounds", + "cType": "int", + "offset_bits": -1 + }, + { + "name": "data", + "cType": "uint8_t[1]", + "offset_bits": -1 + } + ] + }, + { + "name": "AFFINE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "afac", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "bfac", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "cfac", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "dfac", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "efac", + "cType": "double", + "offset_bits": 256 + }, + { + "name": "ffac", + "cType": "double", + "offset_bits": 320 + }, + { + "name": "gfac", + "cType": "double", + "offset_bits": 384 + }, + { + "name": "hfac", + "cType": "double", + "offset_bits": 448 + }, + { + "name": "ifac", + "cType": "double", + "offset_bits": 512 + }, + { + "name": "xoff", + "cType": "double", + "offset_bits": 576 + }, + { + "name": "yoff", + "cType": "double", + "offset_bits": 640 + }, + { + "name": "zoff", + "cType": "double", + "offset_bits": 704 + } + ] + }, + { + "name": "BOX3D", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "xmin", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "ymin", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "zmin", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "xmax", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "ymax", + "cType": "double", + "offset_bits": 256 + }, + { + "name": "zmax", + "cType": "double", + "offset_bits": 320 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 384 + } + ] + }, + { + "name": "GBOX", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 0 + }, + { + "name": "xmin", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "xmax", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "ymin", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "ymax", + "cType": "double", + "offset_bits": 256 + }, + { + "name": "zmin", + "cType": "double", + "offset_bits": 320 + }, + { + "name": "zmax", + "cType": "double", + "offset_bits": 384 + }, + { + "name": "mmin", + "cType": "double", + "offset_bits": 448 + }, + { + "name": "mmax", + "cType": "double", + "offset_bits": 512 + } + ] + }, + { + "name": "SPHEROID", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "a", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "b", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "f", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "e", + "cType": "double", + "offset_bits": 192 + }, + { + "name": "e_sq", + "cType": "double", + "offset_bits": 256 + }, + { + "name": "radius", + "cType": "double", + "offset_bits": 320 + }, + { + "name": "name", + "cType": "char[20]", + "offset_bits": 384 + } + ] + }, + { + "name": "POINT2D", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "x", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "y", + "cType": "double", + "offset_bits": 64 + } + ] + }, + { + "name": "POINT3DZ", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "x", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "y", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "z", + "cType": "double", + "offset_bits": 128 + } + ] + }, + { + "name": "POINT3D", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "x", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "y", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "z", + "cType": "double", + "offset_bits": 128 + } + ] + }, + { + "name": "POINT3DM", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "x", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "y", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "m", + "cType": "double", + "offset_bits": 128 + } + ] + }, + { + "name": "POINT4D", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "x", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "y", + "cType": "double", + "offset_bits": 64 + }, + { + "name": "z", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "m", + "cType": "double", + "offset_bits": 192 + } + ] + }, + { + "name": "POINTARRAY", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "npoints", + "cType": "uint32_t", + "offset_bits": 0 + }, + { + "name": "maxpoints", + "cType": "uint32_t", + "offset_bits": 32 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 64 + }, + { + "name": "serialized_pointlist", + "cType": "uint8_t *", + "offset_bits": 128 + } + ] + }, + { + "name": "GSERIALIZED", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "size", + "cType": "uint32_t", + "offset_bits": 0 + }, + { + "name": "srid", + "cType": "uint8_t[3]", + "offset_bits": 32 + }, + { + "name": "gflags", + "cType": "uint8_t", + "offset_bits": 56 + }, + { + "name": "data", + "cType": "uint8_t[1]", + "offset_bits": 64 + } + ] + }, + { + "name": "LWGEOM", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "data", + "cType": "void *", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + } + ] + }, + { + "name": "LWPOINT", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "point", + "cType": "POINTARRAY *", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + } + ] + }, + { + "name": "LWLINE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "points", + "cType": "POINTARRAY *", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + } + ] + }, + { + "name": "LWTRIANGLE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "points", + "cType": "POINTARRAY *", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + } + ] + }, + { + "name": "LWCIRCSTRING", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "points", + "cType": "POINTARRAY *", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + } + ] + }, + { + "name": "LWPOLY", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "rings", + "cType": "POINTARRAY **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "nrings", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxrings", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWMPOINT", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWPOINT **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWMLINE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWLINE **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWMPOLY", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWPOLY **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWCOLLECTION", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWGEOM **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWCOMPOUND", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWGEOM **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWCURVEPOLY", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "rings", + "cType": "LWGEOM **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "nrings", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxrings", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWMCURVE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWGEOM **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWMSURFACE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWGEOM **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWPSURFACE", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWPOLY **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "LWTIN", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "bbox", + "cType": "GBOX *", + "offset_bits": 0 + }, + { + "name": "geoms", + "cType": "LWTRIANGLE **", + "offset_bits": 64 + }, + { + "name": "srid", + "cType": "int32_t", + "offset_bits": 128 + }, + { + "name": "flags", + "cType": "lwflags_t", + "offset_bits": 160 + }, + { + "name": "type", + "cType": "uint8_t", + "offset_bits": 176 + }, + { + "name": "pad", + "cType": "char[1]", + "offset_bits": 184 + }, + { + "name": "ngeoms", + "cType": "uint32_t", + "offset_bits": 192 + }, + { + "name": "maxgeoms", + "cType": "uint32_t", + "offset_bits": 224 + } + ] + }, + { + "name": "PJconsts", + "file": "postgis_ext_defs.in.h", + "fields": [] + }, + { + "name": "LWPROJ", + "file": "postgis_ext_defs.in.h", + "fields": [ + { + "name": "pj", + "cType": "PJ *", + "offset_bits": 0 + }, + { + "name": "pipeline_is_forward", + "cType": "_Bool", + "offset_bits": 64 + }, + { + "name": "source_is_latlong", + "cType": "uint8_t", + "offset_bits": 72 + }, + { + "name": "source_semi_major_metre", + "cType": "double", + "offset_bits": 128 + }, + { + "name": "source_semi_minor_metre", + "cType": "double", + "offset_bits": 192 + } + ] + }, + { + "name": "cfp_elem", + "file": "trgeo_distance.h", + "fields": [ + { + "name": "geom_1", + "cType": "LWGEOM *", + "offset_bits": 0 + }, + { + "name": "geom_2", + "cType": "LWGEOM *", + "offset_bits": 64 + }, + { + "name": "pose_1", + "cType": "Pose *", + "offset_bits": 128 + }, + { + "name": "pose_2", + "cType": "Pose *", + "offset_bits": 192 + }, + { + "name": "free_pose_1", + "cType": "_Bool", + "offset_bits": 256 + }, + { + "name": "free_pose_2", + "cType": "_Bool", + "offset_bits": 264 + }, + { + "name": "cf_1", + "cType": "uint32_t", + "offset_bits": 288 + }, + { + "name": "cf_2", + "cType": "uint32_t", + "offset_bits": 320 + }, + { + "name": "t", + "cType": "TimestampTz", + "offset_bits": 384 + }, + { + "name": "store", + "cType": "_Bool", + "offset_bits": 448 + } + ] + }, + { + "name": "cfp_array", + "file": "trgeo_distance.h", + "fields": [ + { + "name": "count", + "cType": "size_t", + "offset_bits": 0 + }, + { + "name": "size", + "cType": "size_t", + "offset_bits": 64 + }, + { + "name": "arr", + "cType": "cfp_elem *", + "offset_bits": 128 + } + ] + }, + { + "name": "tdist_elem", + "file": "trgeo_distance.h", + "fields": [ + { + "name": "dist", + "cType": "double", + "offset_bits": 0 + }, + { + "name": "t", + "cType": "TimestampTz", + "offset_bits": 64 + } + ] + }, + { + "name": "tdist_array", + "file": "trgeo_distance.h", + "fields": [ + { + "name": "count", + "cType": "size_t", + "offset_bits": 0 + }, + { + "name": "size", + "cType": "size_t", + "offset_bits": 64 + }, + { + "name": "arr", + "cType": "tdist_elem *", + "offset_bits": 128 + } + ] + }, + { + "name": "SpanBound", + "file": "span.h", + "fields": [ + { + "name": "val", + "cType": "Datum", + "offset_bits": 0 + }, + { + "name": "inclusive", + "cType": "_Bool", + "offset_bits": 64 + }, + { + "name": "lower", + "cType": "_Bool", + "offset_bits": 72 + }, + { + "name": "spantype", + "cType": "uint8", + "offset_bits": 80 + }, + { + "name": "basetype", + "cType": "uint8", + "offset_bits": 88 + } + ] + }, + { + "name": "LiftedFunctionInfo", + "file": "lifting.h", + "fields": [ + { + "name": "func", + "cType": "varfunc", + "offset_bits": 0 + }, + { + "name": "numparam", + "cType": "int", + "offset_bits": 64 + }, + { + "name": "param", + "cType": "Datum[5]", + "offset_bits": 128 + }, + { + "name": "argtype", + "cType": "MeosType[2]", + "offset_bits": 448 + }, + { + "name": "restype", + "cType": "MeosType", + "offset_bits": 512 + }, + { + "name": "reserror", + "cType": "Datum", + "offset_bits": 576 + }, + { + "name": "resnull", + "cType": "int", + "offset_bits": 640 + }, + { + "name": "reslinear", + "cType": "_Bool", + "offset_bits": 672 + }, + { + "name": "invert", + "cType": "_Bool", + "offset_bits": 680 + }, + { + "name": "discont", + "cType": "_Bool", + "offset_bits": 688 + }, + { + "name": "ever", + "cType": "_Bool", + "offset_bits": 696 + }, + { + "name": "tpfn_unary", + "cType": "tpfunc_unary", + "offset_bits": 704 + }, + { + "name": "tpfn_adaptive", + "cType": "_Bool", + "offset_bits": 768 + }, + { + "name": "tpfn_set", + "cType": "tpfunc_set", + "offset_bits": 832 + }, + { + "name": "cross_type", + "cType": "_Bool", + "offset_bits": 896 + }, + { + "name": "tpfn_base", + "cType": "tpfunc_base", + "offset_bits": 960 + }, + { + "name": "tpfn_temp", + "cType": "tpfunc_temp", + "offset_bits": 1024 + } + ] + }, + { + "name": "SetUnnestState", + "file": "set.h", + "fields": [ + { + "name": "done", + "cType": "_Bool", + "offset_bits": 0 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 32 + }, + { + "name": "count", + "cType": "int", + "offset_bits": 64 + }, + { + "name": "set", + "cType": "Set *", + "offset_bits": 128 + }, + { + "name": "values", + "cType": "Datum *", + "offset_bits": 192 + } + ] + }, + { + "name": "SpanNode", + "file": "span_index.h", + "fields": [ + { + "name": "left", + "cType": "Span", + "offset_bits": 0 + }, + { + "name": "right", + "cType": "Span", + "offset_bits": 192 + } + ] + }, + { + "name": "SortedSpan", + "file": "span_index.h", + "fields": [ + { + "name": "s", + "cType": "Span", + "offset_bits": 0 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 192 + } + ] + }, + { + "name": "TboxNode", + "file": "tbox_index.h", + "fields": [ + { + "name": "left", + "cType": "TBox", + "offset_bits": 0 + }, + { + "name": "right", + "cType": "TBox", + "offset_bits": 448 + } + ] + }, + { + "name": "SortedTbox", + "file": "tbox_index.h", + "fields": [ + { + "name": "box", + "cType": "TBox", + "offset_bits": 0 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 448 + } + ] + }, + { + "name": "DggsCellOps", + "file": "tcellindex.h", + "fields": [ + { + "name": "celltype", + "cType": "MeosType", + "offset_bits": 0 + }, + { + "name": "settype", + "cType": "MeosType", + "offset_bits": 32 + }, + { + "name": "temptype", + "cType": "MeosType", + "offset_bits": 64 + }, + { + "name": "min_resolution", + "cType": "int32", + "offset_bits": 96 + }, + { + "name": "max_resolution", + "cType": "int32", + "offset_bits": 128 + }, + { + "name": "point_temptype", + "cType": "MeosType", + "offset_bits": 160 + }, + { + "name": "point_srid", + "cType": "int32", + "offset_bits": 192 + }, + { + "name": "get_resolution", + "cType": "Datum (*)(Datum)", + "offset_bits": 256 + }, + { + "name": "is_valid_cell", + "cType": "Datum (*)(Datum)", + "offset_bits": 320 + }, + { + "name": "cell_to_parent", + "cType": "Datum (*)(Datum, Datum)", + "offset_bits": 384 + }, + { + "name": "cell_to_point", + "cType": "Datum (*)(Datum)", + "offset_bits": 448 + }, + { + "name": "cell_to_boundary", + "cType": "Datum (*)(Datum)", + "offset_bits": 512 + }, + { + "name": "cell_area", + "cType": "Datum (*)(Datum)", + "offset_bits": 576 + } + ] + }, + { + "name": "SimilarityPathState", + "file": "temporal_analytics.h", + "fields": [ + { + "name": "done", + "cType": "_Bool", + "offset_bits": 0 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 32 + }, + { + "name": "size", + "cType": "int", + "offset_bits": 64 + }, + { + "name": "path", + "cType": "Match *", + "offset_bits": 128 + } + ] + }, + { + "name": "RTreeNode", + "file": "temporal_rtree.h", + "fields": [ + { + "name": "bboxsize", + "cType": "size_t", + "offset_bits": 0 + }, + { + "name": "count", + "cType": "int", + "offset_bits": 64 + }, + { + "name": "node_type", + "cType": "RTreeNodeType", + "offset_bits": 96 + }, + { + "name": "boxes", + "cType": "char[]", + "offset_bits": 4224 + } + ] + }, + { + "name": "SpanBinState", + "file": "temporal_tile.h", + "fields": [ + { + "name": "done", + "cType": "_Bool", + "offset_bits": 0 + }, + { + "name": "basetype", + "cType": "uint8", + "offset_bits": 8 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 32 + }, + { + "name": "size", + "cType": "Datum", + "offset_bits": 64 + }, + { + "name": "origin", + "cType": "Datum", + "offset_bits": 128 + }, + { + "name": "span", + "cType": "Span", + "offset_bits": 192 + }, + { + "name": "to_split", + "cType": "const void *", + "offset_bits": 384 + }, + { + "name": "value", + "cType": "Datum", + "offset_bits": 448 + }, + { + "name": "nbins", + "cType": "int", + "offset_bits": 512 + } + ] + }, + { + "name": "TboxGridState", + "file": "temporal_tile.h", + "fields": [ + { + "name": "done", + "cType": "_Bool", + "offset_bits": 0 + }, + { + "name": "i", + "cType": "int", + "offset_bits": 32 + }, + { + "name": "vsize", + "cType": "Datum", + "offset_bits": 64 + }, + { + "name": "tunits", + "cType": "int64", + "offset_bits": 128 + }, + { + "name": "box", + "cType": "TBox", + "offset_bits": 192 + }, + { + "name": "temp", + "cType": "const Temporal *", + "offset_bits": 640 + }, + { + "name": "value", + "cType": "Datum", + "offset_bits": 704 + }, + { + "name": "t", + "cType": "TimestampTz", + "offset_bits": 768 + }, + { + "name": "ntiles", + "cType": "int", + "offset_bits": 832 + }, + { + "name": "max_coords", + "cType": "int[2]", + "offset_bits": 864 + }, + { + "name": "coords", + "cType": "int[2]", + "offset_bits": 928 + } + ] + }, + { + "name": "ekf_t", + "file": "tinyekf_meos.h", + "fields": [ + { + "name": "x", + "cType": "float", + "offset_bits": -1 + }, + { + "name": "P", + "cType": "float", + "offset_bits": -1 + } + ] + } + ], + "enums": [ + { + "name": "errorCode", + "file": "meos_error.h", + "values": [ + { + "name": "MEOS_SUCCESS", + "value": 0 + }, + { + "name": "MEOS_ERR_INTERNAL_ERROR", + "value": 1 + }, + { + "name": "MEOS_ERR_INTERNAL_TYPE_ERROR", + "value": 2 + }, + { + "name": "MEOS_ERR_VALUE_OUT_OF_RANGE", + "value": 3 + }, + { + "name": "MEOS_ERR_DIVISION_BY_ZERO", + "value": 4 + }, + { + "name": "MEOS_ERR_MEMORY_ALLOC_ERROR", + "value": 5 + }, + { + "name": "MEOS_ERR_AGGREGATION_ERROR", + "value": 6 + }, + { + "name": "MEOS_ERR_DIRECTORY_ERROR", + "value": 7 + }, + { + "name": "MEOS_ERR_FILE_ERROR", + "value": 8 + }, + { + "name": "MEOS_ERR_OUT_OF_MEMORY", + "value": 9 + }, + { + "name": "MEOS_ERR_INVALID_ARG", + "value": 10 + }, + { + "name": "MEOS_ERR_INVALID_ARG_TYPE", + "value": 11 + }, + { + "name": "MEOS_ERR_INVALID_ARG_VALUE", + "value": 12 + }, + { + "name": "MEOS_ERR_FEATURE_NOT_SUPPORTED", + "value": 13 + }, + { + "name": "MEOS_ERR_INDETERMINATE_COLLATION", + "value": 14 + }, + { + "name": "MEOS_ERR_SYNTAX_ERROR", + "value": 15 + }, + { + "name": "MEOS_ERR_NULL_RESULT", + "value": 16 + }, + { + "name": "MEOS_ERR_MFJSON_INPUT", + "value": 20 + }, + { + "name": "MEOS_ERR_MFJSON_OUTPUT", + "value": 21 + }, + { + "name": "MEOS_ERR_TEXT_INPUT", + "value": 22 + }, + { + "name": "MEOS_ERR_TEXT_OUTPUT", + "value": 23 + }, + { + "name": "MEOS_ERR_WKB_INPUT", + "value": 24 + }, + { + "name": "MEOS_ERR_WKB_OUTPUT", + "value": 25 + }, + { + "name": "MEOS_ERR_GEOJSON_INPUT", + "value": 26 + }, + { + "name": "MEOS_ERR_GEOJSON_OUTPUT", + "value": 27 + }, + { + "name": "MEOS_ERR_SQL_JSON_ERROR", + "value": 28 + }, + { + "name": "MEOS_ERR_INVALID_REGULAR_EXPRESSION", + "value": 29 + } + ] + }, + { + "name": "tempSubtype", + "file": "meos.h", + "values": [ + { + "name": "ANYTEMPSUBTYPE", + "value": 0 + }, + { + "name": "TINSTANT", + "value": 1 + }, + { + "name": "TSEQUENCE", + "value": 2 + }, + { + "name": "TSEQUENCESET", + "value": 3 + } + ] + }, + { + "name": "interpType", + "file": "meos.h", + "values": [ + { + "name": "INTERP_NONE", + "value": 0 + }, + { + "name": "DISCRETE", + "value": 1 + }, + { + "name": "STEP", + "value": 2 + }, + { + "name": "LINEAR", + "value": 3 + } + ] + }, + { + "name": "RTreeSearchOp", + "file": "meos.h", + "values": [ + { + "name": "RTREE_OVERLAPS", + "value": 0 + }, + { + "name": "RTREE_CONTAINS", + "value": 1 + }, + { + "name": "RTREE_CONTAINED_BY", + "value": 2 + } + ] + }, + { + "name": "spatialRel", + "file": "meos_geo.h", + "values": [ + { + "name": "INTERSECTS", + "value": 0 + }, + { + "name": "CONTAINS", + "value": 1 + }, + { + "name": "TOUCHES", + "value": 2 + }, + { + "name": "COVERS", + "value": 3 + } + ] + }, + { + "name": "MeosType", + "file": "meos_catalog.h", + "values": [ + { + "name": "T_UNKNOWN", + "value": 0 + }, + { + "name": "T_BOOL", + "value": 1 + }, + { + "name": "T_DATE", + "value": 2 + }, + { + "name": "T_DATEMULTIRANGE", + "value": 3 + }, + { + "name": "T_DATERANGE", + "value": 4 + }, + { + "name": "T_DATESET", + "value": 5 + }, + { + "name": "T_DATESPAN", + "value": 6 + }, + { + "name": "T_DATESPANSET", + "value": 7 + }, + { + "name": "T_DOUBLE2", + "value": 8 + }, + { + "name": "T_DOUBLE3", + "value": 9 + }, + { + "name": "T_DOUBLE4", + "value": 10 + }, + { + "name": "T_FLOAT8", + "value": 11 + }, + { + "name": "T_FLOATSET", + "value": 12 + }, + { + "name": "T_FLOATSPAN", + "value": 13 + }, + { + "name": "T_FLOATSPANSET", + "value": 14 + }, + { + "name": "T_INT4", + "value": 15 + }, + { + "name": "T_INT4MULTIRANGE", + "value": 16 + }, + { + "name": "T_INT4RANGE", + "value": 17 + }, + { + "name": "T_INTSET", + "value": 18 + }, + { + "name": "T_INTSPAN", + "value": 19 + }, + { + "name": "T_INTSPANSET", + "value": 20 + }, + { + "name": "T_INT8", + "value": 21 + }, + { + "name": "T_INT8MULTIRANGE", + "value": 52 + }, + { + "name": "T_INT8RANGE", + "value": 53 + }, + { + "name": "T_BIGINTSET", + "value": 22 + }, + { + "name": "T_BIGINTSPAN", + "value": 23 + }, + { + "name": "T_BIGINTSPANSET", + "value": 24 + }, + { + "name": "T_STBOX", + "value": 25 + }, + { + "name": "T_TBOOL", + "value": 26 + }, + { + "name": "T_TBOX", + "value": 27 + }, + { + "name": "T_TDOUBLE2", + "value": 28 + }, + { + "name": "T_TDOUBLE3", + "value": 29 + }, + { + "name": "T_TDOUBLE4", + "value": 30 + }, + { + "name": "T_TEXT", + "value": 31 + }, + { + "name": "T_TEXTSET", + "value": 32 + }, + { + "name": "T_TFLOAT", + "value": 33 + }, + { + "name": "T_TIMESTAMPTZ", + "value": 34 + }, + { + "name": "T_TINT", + "value": 35 + }, + { + "name": "T_TSTZMULTIRANGE", + "value": 36 + }, + { + "name": "T_TSTZRANGE", + "value": 37 + }, + { + "name": "T_TSTZSET", + "value": 38 + }, + { + "name": "T_TSTZSPAN", + "value": 39 + }, + { + "name": "T_TSTZSPANSET", + "value": 40 + }, + { + "name": "T_TTEXT", + "value": 41 + }, + { + "name": "T_GEOMETRY", + "value": 42 + }, + { + "name": "T_GEOMSET", + "value": 43 + }, + { + "name": "T_GEOGRAPHY", + "value": 44 + }, + { + "name": "T_GEOGSET", + "value": 45 + }, + { + "name": "T_TGEOMPOINT", + "value": 46 + }, + { + "name": "T_TGEOGPOINT", + "value": 47 + }, + { + "name": "T_NPOINT", + "value": 48 + }, + { + "name": "T_NPOINTSET", + "value": 49 + }, + { + "name": "T_NSEGMENT", + "value": 50 + }, + { + "name": "T_TNPOINT", + "value": 51 + }, + { + "name": "T_POSE", + "value": 54 + }, + { + "name": "T_POSESET", + "value": 55 + }, + { + "name": "T_TPOSE", + "value": 56 + }, + { + "name": "T_CBUFFER", + "value": 57 + }, + { + "name": "T_CBUFFERSET", + "value": 58 + }, + { + "name": "T_TCBUFFER", + "value": 59 + }, + { + "name": "T_TGEOMETRY", + "value": 60 + }, + { + "name": "T_TGEOGRAPHY", + "value": 61 + }, + { + "name": "T_TRGEOMETRY", + "value": 62 + }, + { + "name": "T_TBIGINT", + "value": 67 + }, + { + "name": "T_H3INDEX", + "value": 68 + }, + { + "name": "T_H3INDEXSET", + "value": 69 + }, + { + "name": "T_TH3INDEX", + "value": 70 + }, + { + "name": "T_QUADBIN", + "value": 71 + }, + { + "name": "T_QUADBINSET", + "value": 72 + }, + { + "name": "T_TQUADBIN", + "value": 73 + }, + { + "name": "T_PCPOINT", + "value": 74 + }, + { + "name": "T_PCPOINTSET", + "value": 75 + }, + { + "name": "T_TPCPOINT", + "value": 76 + }, + { + "name": "T_PCPATCH", + "value": 77 + }, + { + "name": "T_PCPATCHSET", + "value": 78 + }, + { + "name": "T_TPCPATCH", + "value": 79 + }, + { + "name": "T_TPCBOX", + "value": 80 + }, + { + "name": "NUM_MEOS_TYPES", + "value": 81 + } + ] + }, + { + "name": "MeosOper", + "file": "meos_catalog.h", + "values": [ + { + "name": "UNKNOWN_OP", + "value": 0 + }, + { + "name": "EQ_OP", + "value": 1 + }, + { + "name": "NE_OP", + "value": 2 + }, + { + "name": "LT_OP", + "value": 3 + }, + { + "name": "LE_OP", + "value": 4 + }, + { + "name": "GT_OP", + "value": 5 + }, + { + "name": "GE_OP", + "value": 6 + }, + { + "name": "ADJACENT_OP", + "value": 7 + }, + { + "name": "UNION_OP", + "value": 8 + }, + { + "name": "MINUS_OP", + "value": 9 + }, + { + "name": "INTERSECT_OP", + "value": 10 + }, + { + "name": "OVERLAPS_OP", + "value": 11 + }, + { + "name": "CONTAINS_OP", + "value": 12 + }, + { + "name": "CONTAINED_OP", + "value": 13 + }, + { + "name": "SAME_OP", + "value": 14 + }, + { + "name": "LEFT_OP", + "value": 15 + }, + { + "name": "OVERLEFT_OP", + "value": 16 + }, + { + "name": "RIGHT_OP", + "value": 17 + }, + { + "name": "OVERRIGHT_OP", + "value": 18 + }, + { + "name": "BELOW_OP", + "value": 19 + }, + { + "name": "OVERBELOW_OP", + "value": 20 + }, + { + "name": "ABOVE_OP", + "value": 21 + }, + { + "name": "OVERABOVE_OP", + "value": 22 + }, + { + "name": "FRONT_OP", + "value": 23 + }, + { + "name": "OVERFRONT_OP", + "value": 24 + }, + { + "name": "BACK_OP", + "value": 25 + }, + { + "name": "OVERBACK_OP", + "value": 26 + }, + { + "name": "BEFORE_OP", + "value": 27 + }, + { + "name": "OVERBEFORE_OP", + "value": 28 + }, + { + "name": "AFTER_OP", + "value": 29 + }, + { + "name": "OVERAFTER_OP", + "value": 30 + }, + { + "name": "EVEREQ_OP", + "value": 31 + }, + { + "name": "EVERNE_OP", + "value": 32 + }, + { + "name": "EVERLT_OP", + "value": 33 + }, + { + "name": "EVERLE_OP", + "value": 34 + }, + { + "name": "EVERGT_OP", + "value": 35 + }, + { + "name": "EVERGE_OP", + "value": 36 + }, + { + "name": "ALWAYSEQ_OP", + "value": 37 + }, + { + "name": "ALWAYSNE_OP", + "value": 38 + }, + { + "name": "ALWAYSLT_OP", + "value": 39 + }, + { + "name": "ALWAYSLE_OP", + "value": 40 + }, + { + "name": "ALWAYSGT_OP", + "value": 41 + }, + { + "name": "ALWAYSGE_OP", + "value": 42 + } + ] + }, + { + "name": "SkipListType", + "file": "meos_internal.h", + "values": [ + { + "name": "SKIPLIST_TEMPORAL", + "value": 0 + }, + { + "name": "SKIPLIST_KEYVALUE", + "value": 1 + } + ] + }, + { + "name": "SyncMode", + "file": "temporal.h", + "values": [ + { + "name": "SYNCHRONIZE_NOCROSS", + "value": 0 + }, + { + "name": "SYNCHRONIZE_CROSS", + "value": 1 + } + ] + }, + { + "name": "TemporalFamily", + "file": "temporal.h", + "values": [ + { + "name": "TEMPORALTYPE", + "value": 0 + }, + { + "name": "TNUMBERTYPE", + "value": 1 + }, + { + "name": "TSPATIALTYPE", + "value": 2 + } + ] + }, + { + "name": "SetOper", + "file": "temporal.h", + "values": [ + { + "name": "UNION", + "value": 0 + }, + { + "name": "INTER", + "value": 1 + }, + { + "name": "MINUS", + "value": 2 + } + ] + }, + { + "name": "CompOper", + "file": "temporal.h", + "values": [ + { + "name": "EQ", + "value": 0 + }, + { + "name": "NE", + "value": 1 + }, + { + "name": "LT", + "value": 2 + }, + { + "name": "LE", + "value": 3 + }, + { + "name": "GT", + "value": 4 + }, + { + "name": "GE", + "value": 5 + } + ] + }, + { + "name": "MEOS_WKB_TSUBTYPE", + "file": "temporal.h", + "values": [ + { + "name": "MEOS_WKB_TINSTANT", + "value": 1 + }, + { + "name": "MEOS_WKB_TSEQUENCE", + "value": 2 + }, + { + "name": "MEOS_WKB_TSEQUENCESET", + "value": 3 + } + ] + }, + { + "name": "ClipOper", + "file": "geo_poly_clip.h", + "values": [ + { + "name": "CL_INTERSECTION", + "value": 0 + }, + { + "name": "CL_UNION", + "value": 1 + }, + { + "name": "CL_DIFFERENCE", + "value": 2 + }, + { + "name": "CL_XOR", + "value": 3 + } + ] + }, + { + "name": "H3Unit", + "file": "th3index_internal.h", + "values": [ + { + "name": "H3_UNIT_KM", + "value": 0 + }, + { + "name": "H3_UNIT_M", + "value": 1 + }, + { + "name": "H3_UNIT_RADS", + "value": 2 + }, + { + "name": "H3_UNIT_KM2", + "value": 3 + }, + { + "name": "H3_UNIT_M2", + "value": 4 + }, + { + "name": "H3_UNIT_RADS2", + "value": 5 + } + ] + }, + { + "name": "nullHandleType", + "file": "meos_json.h", + "values": [ + { + "name": "NULL_INVALID", + "value": 0 + }, + { + "name": "NULL_ERROR", + "value": 1 + }, + { + "name": "NULL_JSON_NULL", + "value": 2 + }, + { + "name": "NULL_DELETE", + "value": 3 + }, + { + "name": "NULL_RETURN", + "value": 4 + } + ] + }, + { + "name": "MeosPixType", + "file": "meos_raster.h", + "values": [ + { + "name": "MEOS_PT_UINT8", + "value": 0 + }, + { + "name": "MEOS_PT_INT16", + "value": 1 + }, + { + "name": "MEOS_PT_INT32", + "value": 2 + }, + { + "name": "MEOS_PT_FLOAT32", + "value": 3 + }, + { + "name": "MEOS_PT_FLOAT64", + "value": 4 + } + ] + }, + { + "name": "GeoPoseClass", + "file": "pose_geopose.h", + "values": [ + { + "name": "GEOPOSE_BASIC_QUATERNION", + "value": 0 + }, + { + "name": "GEOPOSE_BASIC_YPR", + "value": 1 + } + ] + }, + { + "name": "SimFunc", + "file": "temporal_analytics.h", + "values": [ + { + "name": "FRECHET", + "value": 0 + }, + { + "name": "DYNTIMEWARP", + "value": 1 + }, + { + "name": "HAUSDORFF", + "value": 2 + } + ] + }, + { + "name": "RTreeNodeType", + "file": "temporal_rtree.h", + "values": [ + { + "name": "RTREE_LEAF", + "value": 0 + }, + { + "name": "RTREE_INNER", + "value": 1 + } + ] + }, + { + "name": "TArithmetic", + "file": "tnumber_mathfuncs.h", + "values": [ + { + "name": "ADD", + "value": 0 + }, + { + "name": "SUB", + "value": 1 + }, + { + "name": "MUL", + "value": 2 + }, + { + "name": "DIV", + "value": 3 + }, + { + "name": "DIST", + "value": 4 + } + ] + } + ] +} \ No newline at end of file diff --git a/tools/codegen/missing-ops-descriptor.json b/tools/codegen/missing-ops-descriptor.json new file mode 100644 index 0000000000..5fd0b74c67 --- /dev/null +++ b/tools/codegen/missing-ops-descriptor.json @@ -0,0 +1,2289 @@ +{ + "_comment": "Gap-fill operators from the fullgen branch that are present in the canonical TARGET_SURFACE.txt (69 of 303 original entries).", + "operators": [ + { + "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": "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": "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": "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": "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": "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": "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": "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": "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." + } + ] +} \ No newline at end of file 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