Skip to content

feat(meos): add TEMPORAL_ROUND, TDISTANCE_TFLOAT_FLOAT, TDISTANCE_TNUMBER_TNUMBER NES operators (W50)#79

Closed
estebanzimanyi wants to merge 8 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/nebula-codegen-w50-tnumber-distance-round
Closed

feat(meos): add TEMPORAL_ROUND, TDISTANCE_TFLOAT_FLOAT, TDISTANCE_TNUMBER_TNUMBER NES operators (W50)#79
estebanzimanyi wants to merge 8 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/nebula-codegen-w50-tnumber-distance-round

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Adds per-event NES operators backed by temporal_round (3-arg: value, ts, maxdd), tdistance_tfloat_float (3-arg: value, ts, d), and tdistance_tnumber_tnumber (3-arg: value1, value2, ts). Each operator constructs one or two co-instant tfloats, applies the MEOS function, and returns the resulting double. Logical/physical function pairs, plugin registrations, grammar tokens, and parser case blocks are included.

…aho-mqtt-cpp

The Nix environment provides paho-mqtt-cpp as a shared-only library and does
not include libmeos.  Four changes make the build pass:

- flake.nix: add stock paho-mqtt-c + paho-mqtt-cpp to baseThirdPartyDeps;
  pass -DNES_ENABLE_MEOS=OFF in both defaultPackage and devShell cmakeFlags.

- nes-plugins/CMakeLists.txt: introduce NES_ENABLE_MQTT and NES_ENABLE_MEOS
  options that gate the respective plugin subdirectories via
  activate_optional_plugin().

- nes-plugins/Sources/MQTTSource, nes-plugins/Sinks/MQTTSink: select
  PahoMqttCpp::paho-mqttpp3-static when available, fall back to the shared
  PahoMqttCpp::paho-mqttpp3 target (Nix only ships the shared variant).

- nes-physical-operators: gate all MEOS-specific add_plugin calls and the
  nes-meos link behind if(NES_ENABLE_MEOS) in three CMakeLists files
  (top-level, Functions/Meos, Aggregation/Function/Meos).

- CMakeLists.txt (root): declare option(NES_ENABLE_MEOS) and
  add_compile_definitions(NES_ENABLE_MEOS) before the nes-* subdirectory
  loop so the preprocessor symbol is visible to all sibling components.

- nes-query-optimizer/LowerToPhysicalWindowedAggregation.cpp: guard the
  TemporalSequenceAggregationPhysicalFunction include and instantiation
  with #ifdef NES_ENABLE_MEOS so the translation unit compiles and links
  when MEOS is disabled.
Add TFLOAT_SIN, TFLOAT_COS, TFLOAT_TAN as per-event scalar operators
following the extract-marshaler pattern from W25. Each takes (value:FLOAT64,
ts:UINT64), constructs a MEOS single-instant temporal via tfloat_in, applies
the trig C function, and extracts the FLOAT64 result via tfloat_start_value.

Logical and physical function pairs registered as NES plugins; SQL parser
extended with TFLOAT_SIN/COS/TAN tokens in the functionName rule and 2-arg
case blocks.
Add TFLOAT_CEIL, TFLOAT_FLOOR, TFLOAT_RADIANS, TFLOAT_DEGREES as per-event
scalar operators following the extract-marshaler pattern from W44. Each takes
(value:FLOAT64, ts:UINT64), constructs a MEOS single-instant temporal via
tfloat_in, applies the scalar C function, and extracts the FLOAT64 result via
tfloat_start_value. TFLOAT_DEGREES hardcodes normalize=false.

Logical and physical function pairs registered as NES plugins; SQL parser
extended with TFLOAT_CEIL/FLOOR/RADIANS/DEGREES tokens in the functionName
rule and 2-arg case blocks.
Add TFLOAT_SHIFT_VALUE and TFLOAT_SCALE_VALUE as per-event scalar operators
following the extract-marshaler pattern. Each takes (value:FLOAT64, ts:UINT64,
param:FLOAT64), constructs a MEOS single-instant temporal via tfloat_in, applies
the shift or scale, and extracts the FLOAT64 result via tfloat_start_value.

Logical and physical function pairs registered as NES plugins; SQL parser
extended with TFLOAT_SHIFT_VALUE/SCALE_VALUE tokens in the functionName rule
and 3-arg case blocks.
…s (W47)

Adds per-event NES operators backed by `tnumber_abs` (2-arg: value, ts)
and `tfloat_shift_scale_value` (4-arg: value, ts, shift, width). Each
operator constructs a single-instant tfloat, applies the MEOS function,
and returns the resulting double. Logical/physical function pairs, plugin
registrations, grammar tokens, and parser case blocks are included.
Adds per-event NES operators backed by `add_tfloat_float`,
`sub_tfloat_float`, `mul_tfloat_float`, and `div_tfloat_float`
(3-arg each: value, ts, scalar). Each operator constructs a
single-instant tfloat, applies the MEOS arithmetic function against
a constant scalar, and returns the resulting double. Logical/physical
function pairs, plugin registrations, grammar tokens, and parser
case blocks are included.
Adds per-event NES operators backed by `add_tnumber_tnumber`,
`sub_tnumber_tnumber`, `mul_tnumber_tnumber`, and `div_tnumber_tnumber`
(3-arg each: value1, value2, shared-ts). Each operator constructs two
co-instant tfloats, applies the MEOS element-wise arithmetic function,
and returns the resulting double. Logical/physical function pairs,
plugin registrations, grammar tokens, and parser case blocks are
included.
…MBER_TNUMBER NES operators (W50)

Adds per-event NES operators backed by temporal_round (3-arg: value, ts,
maxdd), tdistance_tfloat_float (3-arg: value, ts, d), and
tdistance_tnumber_tnumber (3-arg: value1, value2, ts). Each operator
constructs one or two co-instant tfloats, applies the MEOS function, and
returns the resulting double. Logical/physical function pairs, plugin
registrations, grammar tokens, and parser case blocks are included.
@estebanzimanyi

Copy link
Copy Markdown
Member Author

Superseded by the generator-derived canonical surface: the Nix build fix (#171), the per-event operator generator (#185), and the 615-op generated surface — every operator this PR adds is regenerated from the MobilityDB master IDL and compile-verified there (generator==committed enforced by a drift-guard CI). Folding this wave into that deliverable; reopen if a specific operator needs attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant