Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
6b54911
fix(ci): make the Nix build work with NES_ENABLE_MEOS=OFF and stock p…
estebanzimanyi Jun 11, 2026
a23e829
feat(nebula): wire per-event tfloat_sin/tfloat_cos/tfloat_tan (W44)
estebanzimanyi Jun 11, 2026
be23758
feat(nebula): wire per-event tfloat_ceil/floor/radians/degrees (W45)
estebanzimanyi Jun 11, 2026
384c4c3
feat(nebula): wire per-event tfloat_shift_value/scale_value (W46)
estebanzimanyi Jun 12, 2026
02ee116
feat(meos): add TNUMBER_ABS and TFLOAT_SHIFT_SCALE_VALUE NES operator…
estebanzimanyi Jun 12, 2026
6ff9b08
feat(meos): add ADD/SUB/MUL/DIV_TFLOAT_FLOAT NES operators (W48)
estebanzimanyi Jun 12, 2026
d376592
feat(meos): add ADD/SUB/MUL/DIV_TNUMBER_TNUMBER NES operators (W49)
estebanzimanyi Jun 12, 2026
69172ab
feat(meos): add TEMPORAL_ROUND, TDISTANCE_TFLOAT_FLOAT, TDISTANCE_TNU…
estebanzimanyi Jun 12, 2026
b789caf
feat(meos): add ADD/SUB/MUL/DIV_TINT_INT NES operators (W51)
estebanzimanyi Jun 12, 2026
e64267a
feat(meos): add TDISTANCE_TINT_INT, TINT_SHIFT_VALUE, TINT_SCALE_VALU…
estebanzimanyi Jun 12, 2026
9be6759
feat(meos): add TFLOAT_TO_TINT and TINT_TO_TFLOAT type-conversion NES…
estebanzimanyi Jun 12, 2026
e53bbc1
feat(meos): add tbigint type-conversion NES operators TBIGINT_TO_TINT…
estebanzimanyi Jun 12, 2026
677ea80
feat(meos): add ADD/SUB/MUL/DIV_TBIGINT_BIGINT NES operators (W55)
estebanzimanyi Jun 12, 2026
6e878c9
feat(meos): add TBIGINT_SHIFT_VALUE, TBIGINT_SCALE_VALUE, TBIGINT_SHI…
estebanzimanyi Jun 12, 2026
09eb347
feat(meos): add ADD/SUB/MUL/DIV_FLOAT_TFLOAT reversed NES operators (…
estebanzimanyi Jun 12, 2026
e7a09dc
feat(meos): add ADD/SUB/MUL/DIV_INT_TINT reversed NES operators (W58)
estebanzimanyi Jun 12, 2026
8a4f6c9
feat(meos): add ADD/SUB/MUL/DIV_BIGINT_TBIGINT reversed NES operators…
estebanzimanyi Jun 12, 2026
5d3a3c9
feat(meos): add TFLOAT_EXP, TFLOAT_LN, TFLOAT_LOG10 NES operators (W60)
estebanzimanyi Jun 12, 2026
367ebad
feat(meos): add EVER_EQ/GE/GT/LE/LT/NE_TFLOAT_FLOAT NES operators (W61)
estebanzimanyi Jun 12, 2026
2c9998d
feat(meos): add ALWAYS_EQ/GE/GT/LE/LT/NE_TFLOAT_FLOAT NES operators (…
estebanzimanyi Jun 12, 2026
d5446af
feat(meos): add EVER_EQ/GE/GT/LE/LT/NE_TINT_INT NES operators (W63)
estebanzimanyi Jun 12, 2026
0dc2fef
feat(meos): add ALWAYS_EQ/GE/GT/LE/LT/NE_TINT_INT NES operators (W64)
estebanzimanyi Jun 12, 2026
346aed1
feat(meos): add EVER_EQ/GE/GT/LE/LT/NE_TBIGINT_BIGINT NES operators (…
estebanzimanyi Jun 12, 2026
d8510a7
feat(meos): add ALWAYS_EQ/GE/GT/LE/LT/NE_TBIGINT_BIGINT NES operators…
estebanzimanyi Jun 12, 2026
255e579
feat(meos): add EVER_EQ/GE/GT/LE/LT/NE_TFLOAT_TFLOAT NES operators (W67)
estebanzimanyi Jun 12, 2026
5331eb2
feat(meos): add ALWAYS_EQ/GE/GT/LE/LT/NE_TFLOAT_TFLOAT NES operators …
estebanzimanyi Jun 12, 2026
f4456a8
feat(meos): add EVER_EQ/GE/GT/LE/LT/NE_TINT_TINT NES operators (W69)
estebanzimanyi Jun 12, 2026
1e358ab
feat(meos): add ALWAYS_EQ/GE/GT/LE/LT/NE_TINT_TINT NES operators (W70)
estebanzimanyi Jun 12, 2026
ca9f381
feat(meos): add EVER_EQ/GE/GT/LE/LT/NE_TBIGINT_TBIGINT NES operators …
estebanzimanyi Jun 12, 2026
6e5285e
feat(meos): add ALWAYS_EQ/GE/GT/LE/LT/NE_TBIGINT_TBIGINT NES operator…
estebanzimanyi Jun 12, 2026
418328a
feat(meos): add EVER/ALWAYS_EQ/GE/GT/LE/LT/NE reversed scalar NES ope…
estebanzimanyi Jun 12, 2026
5f4f2bb
feat(meos): add EVER/ALWAYS_EQ/NE_{TBOOL_BOOL,BOOL_TBOOL} NES operato…
estebanzimanyi Jun 12, 2026
7ea99e6
feat(meos): add EVER/ALWAYS_{EQ,GE,GT,LE,LT,NE}_TEMPORAL_TEMPORAL NES…
estebanzimanyi Jun 12, 2026
370f9c5
feat(meos): add TNOT_TBOOL, TAND_{BOOL_TBOOL,TBOOL_BOOL,TBOOL_TBOOL},…
estebanzimanyi Jun 12, 2026
d3e8b1e
feat(meos): add TEQ_{BOOL_TBOOL,TBOOL_BOOL,FLOAT_TFLOAT,TFLOAT_FLOAT,…
estebanzimanyi Jun 12, 2026
84ca660
feat(meos): add TNE_{BOOL_TBOOL,TBOOL_BOOL,FLOAT_TFLOAT,TFLOAT_FLOAT,…
estebanzimanyi Jun 12, 2026
6c1c293
feat(meos): add TGE_{FLOAT_TFLOAT,TFLOAT_FLOAT,INT_TINT,TINT_INT,TEMP…
estebanzimanyi Jun 12, 2026
c5600b3
feat(meos): add TGT_{FLOAT_TFLOAT,TFLOAT_FLOAT,INT_TINT,TINT_INT,TEMP…
estebanzimanyi Jun 12, 2026
73500c4
feat(meos): add TLE_{FLOAT_TFLOAT,TFLOAT_FLOAT,INT_TINT,TINT_INT,TEMP…
estebanzimanyi Jun 12, 2026
5500dea
feat(meos): add TLT_{FLOAT_TFLOAT,TFLOAT_FLOAT,INT_TINT,TINT_INT,TEMP…
estebanzimanyi Jun 12, 2026
f6c228a
feat(meos): add TBOOL_TO_TINT NES operator (W92)
estebanzimanyi Jun 12, 2026
99cfffc
feat(meos): add ttext scalar comparison NES operators (W93)
estebanzimanyi Jun 14, 2026
42e3e91
feat(meos): add TGE/TGT/TLE/TLT_{TTEXT_TEXT,TEXT_TTEXT} NES operators…
estebanzimanyi Jun 14, 2026
e067703
feat(meos): add TTEXT_UPPER/LOWER/INITCAP NES operators (W95)
estebanzimanyi Jun 14, 2026
1373e04
feat(meos): add TEXTCAT_{TTEXT_TEXT,TEXT_TTEXT,TTEXT_TTEXT} NES opera…
estebanzimanyi Jun 14, 2026
c03d6fb
feat(meos): add GEOM_{INTERSECTS2D,DWITHIN2D,CONTAINS,DISJOINT2D} NES…
estebanzimanyi Jun 14, 2026
b37123c
feat(meos): add GEOM_{COVERS,TOUCHES,INTERSECTS3D,DWITHIN3D,DISTANCE2…
estebanzimanyi Jun 14, 2026
1e12669
feat(meos): add GEOM_{LENGTH,PERIMETER} NES operators (W99)
estebanzimanyi Jun 14, 2026
1e082df
feat(meos): add GEOM_AZIMUTH NES operator (W101)
estebanzimanyi Jun 14, 2026
84cc7d0
feat(meos): add GEOG_{AREA,LENGTH,PERIMETER} and GEOM_IS_EMPTY NES op…
estebanzimanyi Jun 14, 2026
dfd6200
feat(meos): add AINTERSECTS/ACOVERS/ADISJOINT/ADWITHIN_TGEO_GEO NES o…
estebanzimanyi Jun 14, 2026
bca520b
feat(meos): add EINTERSECTS/ETOUCHES/ECONTAINS/ACONTAINS/ATOUCHES_TGE…
estebanzimanyi Jun 14, 2026
9da756c
feat(meos): add GEO_NUM_POINTS/GEOS/SRID/IS_UNITARY, GEO_EQUALS/SAME,…
estebanzimanyi Jun 14, 2026
e5901ef
feat(meos): add NAD_TGEO_GEO nearest-approach distance NES operator (…
estebanzimanyi Jun 14, 2026
19fb3e5
feat(meos): add EVER/ALWAYS_EQ/NE_TGEO_GEO NES operators (W107)
estebanzimanyi Jun 14, 2026
0a1b77d
feat(meos): add GEOG_INTERSECTS and GEOG_DWITHIN NES operators (W108)
estebanzimanyi Jun 14, 2026
4e980ce
feat(meos): add GEOM_INTERSECTS, GEOM_DWITHIN, ACOVERS_GEO_TGEO NES o…
estebanzimanyi Jun 14, 2026
59761f4
feat(meos): add H3_GS_POINT_TO_CELL and EVER/ALWAYS_EQ/NE_TH3INDEX_H3…
estebanzimanyi Jun 14, 2026
6dba4b2
feat(meos): add TH3INDEX hierarchy and property NES operators (W111)
estebanzimanyi Jun 14, 2026
4d88da1
feat(meos): add TH3INDEX_ARE_NEIGHBOR_CELLS and TH3INDEX_GRID_DISTANC…
estebanzimanyi Jun 15, 2026
cc7a3e8
feat(meos): add tcbuffer_geo spatial predicate NES operators (W113)
estebanzimanyi Jun 15, 2026
c96338d
feat(meos): add EDWITHIN_TCBUFFER_GEO and ADWITHIN_TCBUFFER_GEO NES o…
estebanzimanyi Jun 15, 2026
1032502
feat(meos): add tcbuffer_cbuffer spatial predicate NES operators (W115)
estebanzimanyi Jun 15, 2026
9096e0a
feat(meos): add tcbuffer_tcbuffer per-event scalar operators (W116)
estebanzimanyi Jun 15, 2026
291ccfd
feat(meos): add tcbuffer_tcbuffer dwithin and mindistance NES operato…
estebanzimanyi Jun 15, 2026
e152df0
feat(meos): add tnpoint per-event scalar operators for geo and npoint…
estebanzimanyi Jun 15, 2026
12787f8
feat(meos): add tnpoint_tnpoint per-event scalar operators (W119)
estebanzimanyi Jun 15, 2026
90007ba
feat(meos): add tpose 2D per-event scalar operators for geo and pose …
estebanzimanyi Jun 15, 2026
8788a22
feat(meos): add tpose_tpose 2D per-event scalar operators (W121)
estebanzimanyi Jun 15, 2026
0ca8b47
feat(meos): add trgeometry 2D per-event scalar operators for geo (W122)
estebanzimanyi Jun 15, 2026
a8a589b
feat(meos): add trgeometry_trgeometry 2D per-event scalar operators (…
estebanzimanyi Jun 15, 2026
78bf94a
feat(meos): add TPCPOINT per-event spatial predicate NES operators (W…
estebanzimanyi Jun 15, 2026
428e57e
feat(meos): add QUADBIN static cell NES operators (W125)
estebanzimanyi Jun 15, 2026
78442b5
feat(meos): add TJSONB_JSONB per-event comparison NES operators (W126)
estebanzimanyi Jun 15, 2026
4975268
feat(meos): add TJSONB_TJSONB per-event comparison NES operators (W127)
estebanzimanyi Jun 15, 2026
531fba5
feat(meos): add unary geometry transform NES operators returning WKT …
estebanzimanyi Jun 15, 2026
238b3ae
feat(meos): add binary geometry set operation NES operators returning…
estebanzimanyi Jun 15, 2026
7efa8c6
feat(meos): add parameterized geometry transform NES operators return…
estebanzimanyi Jun 15, 2026
4af25bc
feat(meos): add line geometry NES operators (W131)
estebanzimanyi Jun 15, 2026
934b960
feat(meos): add geometry constructor and conversion NES operators (W132)
estebanzimanyi Jun 15, 2026
4b9bee2
feat(meos): add index-based geometry extraction and collection inters…
estebanzimanyi Jun 15, 2026
18e5a82
feat(meos): add geometry format, pipeline, and bounding-radius NES op…
estebanzimanyi Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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-*")
Expand Down
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
tbb
python3
openjdk21
paho-mqtt-c
paho-mqtt-cpp
]) ++ [ follyPkg antlr4Pkg ];

antlr4Jar = pkgs.fetchurl {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <Functions/LogicalFunction.hpp>
#include <string_view>
#include <utility>
#include <vector>

namespace NES {

/**
* @brief Returns 1.0 if the tcbuffer always contains the static cbuffer, 0.0 otherwise.
*
* Args: (lon1:FLOAT64, lat1:FLOAT64, r1:FLOAT64, ts:UINT64,
* lon2:FLOAT64, lat2:FLOAT64, r2:FLOAT64) -> FLOAT64.
*/
class AcontainsTcbufferCbufferLogicalFunction : public LogicalFunctionConcept {
public:
static constexpr std::string_view NAME = "AcontainsTcbufferCbuffer";

AcontainsTcbufferCbufferLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction r1,
LogicalFunction ts,
LogicalFunction lon2, LogicalFunction lat2, LogicalFunction r2);

DataType getDataType() const override;
LogicalFunction withDataType(const DataType& dataType) const override;
std::vector<LogicalFunction> getChildren() const override;
LogicalFunction withChildren(const std::vector<LogicalFunction>& children) const override;
std::string_view getType() const override;
bool operator==(const LogicalFunctionConcept& rhs) const override;
std::string explain(ExplainVerbosity verbosity) const override;
LogicalFunction withInferredDataType(const Schema& schema) const override;
SerializableFunction serialize() const override;

private:
DataType dataType;
std::vector<LogicalFunction> parameters;
};

} // namespace NES
Original file line number Diff line number Diff line change
@@ -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 <Functions/LogicalFunction.hpp>
#include <string_view>
#include <utility>
#include <vector>

namespace NES {

/**
* @brief Returns 1.0 if the tcbuffer always contains the static geometry, 0.0 otherwise.
*
* Args: (lon:FLOAT64, lat:FLOAT64, radius:FLOAT64, ts:UINT64, wkt:VARCHAR) -> FLOAT64.
*/
class AcontainsTcbufferGeoLogicalFunction : public LogicalFunctionConcept {
public:
static constexpr std::string_view NAME = "AcontainsTcbufferGeo";

AcontainsTcbufferGeoLogicalFunction(LogicalFunction lon, LogicalFunction lat,
LogicalFunction radius, LogicalFunction ts,
LogicalFunction wkt);

DataType getDataType() const override;
LogicalFunction withDataType(const DataType& dataType) const override;
std::vector<LogicalFunction> getChildren() const override;
LogicalFunction withChildren(const std::vector<LogicalFunction>& children) const override;
std::string_view getType() const override;
bool operator==(const LogicalFunctionConcept& rhs) const override;
std::string explain(ExplainVerbosity verbosity) const override;
LogicalFunction withInferredDataType(const Schema& schema) const override;
SerializableFunction serialize() const override;

private:
DataType dataType;
std::vector<LogicalFunction> parameters;
};

} // namespace NES
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#pragma once

#include <Functions/LogicalFunction.hpp>
#include <string_view>
#include <utility>
#include <vector>

namespace NES {

/**
* @brief Returns 1.0 if temporal geometry always contains the static geometry.
*
* Args: (lon:FLOAT64, lat:FLOAT64, ts:UINT64, wkt:VARCHAR) -> FLOAT64.
*/
class AcontainsTgeoGeoLogicalFunction : public LogicalFunctionConcept {
public:
static constexpr std::string_view NAME = "AcontainsTgeoGeo";

AcontainsTgeoGeoLogicalFunction(LogicalFunction lon, LogicalFunction lat,
LogicalFunction ts, LogicalFunction wkt);

DataType getDataType() const override;
LogicalFunction withDataType(const DataType& dataType) const override;
std::vector<LogicalFunction> getChildren() const override;
LogicalFunction withChildren(const std::vector<LogicalFunction>& children) const override;
std::string_view getType() const override;
bool operator==(const LogicalFunctionConcept& rhs) const override;
std::string explain(ExplainVerbosity verbosity) const override;
LogicalFunction withInferredDataType(const Schema& schema) const override;
SerializableFunction serialize() const override;

private:
DataType dataType;
std::vector<LogicalFunction> parameters;
};

} // namespace NES
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#pragma once

#include <Functions/LogicalFunction.hpp>
#include <string_view>
#include <utility>
#include <vector>

namespace NES {

/**
* @brief Returns 1.0 if the static geometry always covers the temporal geometry instant.
*
* Args: (wkt:VARCHAR, lon:FLOAT64, lat:FLOAT64, ts:UINT64) -> FLOAT64.
*/
class AcoversGeoTgeoLogicalFunction : public LogicalFunctionConcept {
public:
static constexpr std::string_view NAME = "AcoversGeoTgeo";

AcoversGeoTgeoLogicalFunction(LogicalFunction wkt, LogicalFunction lon,
LogicalFunction lat, LogicalFunction ts);

DataType getDataType() const override;
LogicalFunction withDataType(const DataType& dataType) const override;
std::vector<LogicalFunction> getChildren() const override;
LogicalFunction withChildren(const std::vector<LogicalFunction>& children) const override;
std::string_view getType() const override;
bool operator==(const LogicalFunctionConcept& rhs) const override;
std::string explain(ExplainVerbosity verbosity) const override;
LogicalFunction withInferredDataType(const Schema& schema) const override;
SerializableFunction serialize() const override;

private:
DataType dataType;
std::vector<LogicalFunction> parameters;
};

} // namespace NES
Original file line number Diff line number Diff line change
@@ -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 <Functions/LogicalFunction.hpp>
#include <string_view>
#include <utility>
#include <vector>

namespace NES {

/**
* @brief Returns 1.0 if the tcbuffer always covers the static cbuffer, 0.0 otherwise.
*
* Args: (lon1:FLOAT64, lat1:FLOAT64, r1:FLOAT64, ts:UINT64,
* lon2:FLOAT64, lat2:FLOAT64, r2:FLOAT64) -> FLOAT64.
*/
class AcoversTcbufferCbufferLogicalFunction : public LogicalFunctionConcept {
public:
static constexpr std::string_view NAME = "AcoversTcbufferCbuffer";

AcoversTcbufferCbufferLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction r1,
LogicalFunction ts,
LogicalFunction lon2, LogicalFunction lat2, LogicalFunction r2);

DataType getDataType() const override;
LogicalFunction withDataType(const DataType& dataType) const override;
std::vector<LogicalFunction> getChildren() const override;
LogicalFunction withChildren(const std::vector<LogicalFunction>& children) const override;
std::string_view getType() const override;
bool operator==(const LogicalFunctionConcept& rhs) const override;
std::string explain(ExplainVerbosity verbosity) const override;
LogicalFunction withInferredDataType(const Schema& schema) const override;
SerializableFunction serialize() const override;

private:
DataType dataType;
std::vector<LogicalFunction> parameters;
};

} // namespace NES
Original file line number Diff line number Diff line change
@@ -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 <Functions/LogicalFunction.hpp>
#include <string_view>
#include <utility>
#include <vector>

namespace NES {

/**
* @brief Returns 1.0 if the tcbuffer always covers the static geometry, 0.0 otherwise.
*
* Args: (lon:FLOAT64, lat:FLOAT64, radius:FLOAT64, ts:UINT64, wkt:VARCHAR) -> FLOAT64.
*/
class AcoversTcbufferGeoLogicalFunction : public LogicalFunctionConcept {
public:
static constexpr std::string_view NAME = "AcoversTcbufferGeo";

AcoversTcbufferGeoLogicalFunction(LogicalFunction lon, LogicalFunction lat,
LogicalFunction radius, LogicalFunction ts,
LogicalFunction wkt);

DataType getDataType() const override;
LogicalFunction withDataType(const DataType& dataType) const override;
std::vector<LogicalFunction> getChildren() const override;
LogicalFunction withChildren(const std::vector<LogicalFunction>& children) const override;
std::string_view getType() const override;
bool operator==(const LogicalFunctionConcept& rhs) const override;
std::string explain(ExplainVerbosity verbosity) const override;
LogicalFunction withInferredDataType(const Schema& schema) const override;
SerializableFunction serialize() const override;

private:
DataType dataType;
std::vector<LogicalFunction> parameters;
};

} // namespace NES
Loading
Loading