Skip to content

feat(codegen): per-event MEOS operator generator#185

Closed
estebanzimanyi wants to merge 2 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/nebula-codegen
Closed

feat(codegen): per-event MEOS operator generator#185
estebanzimanyi wants to merge 2 commits into
MobilityDB:mainfrom
estebanzimanyi:feat/nebula-codegen

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

tools/codegen/codegen_nebula.py generates all 4 C++ files (logical/physical hpp+cpp) per operator from JSON descriptors; supports build_generic, build_tcbuffer_point_cbuffer, and trgeometry-family dispatch paths. Return kinds include uint64, varsized_json_out, varsized_floatspan, varsized_intspan; extra_arg kind raw_varsized.

tools/codegen/gen_all.py orchestrates nine descriptor families and injects CMakeLists.txt, AntlrSQL.g4, and AntlrSQLQueryPlanCreator.cpp.

Nine descriptor JSON files cover 615 canonical per-event ops: tfloat trig/transforms, tint/tfloat/tbigint arithmetic and comparisons, tgeo/tcbuffer/tnpoint/tpose/trgeometry spatial predicates, h3/quadbin/tjsonb, geom transforms, span, and text operators. Bbox/topological ops and non-canonical per-type numeric two-temporal comparisons are intentionally excluded.

tools/codegen/meos-idl-master.json is the IDL snapshot from MobilityDB master used to author the descriptor families. tools/codegen/build_descriptor.py and tools/codegen/build_local.sh support authoring new descriptor families.

…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.
tools/codegen/codegen_nebula.py generates all 4 C++ files (logical/physical
hpp+cpp) per operator from JSON descriptors; supports build_generic,
build_tcbuffer_point_cbuffer, and trgeometry-family dispatch paths.
Return kinds include uint64, varsized_json_out, varsized_floatspan,
varsized_intspan; extra_arg kind raw_varsized.

tools/codegen/gen_all.py orchestrates nine descriptor families and injects
CMakeLists.txt, AntlrSQL.g4, and AntlrSQLQueryPlanCreator.cpp.

Nine descriptor JSON files cover 615 canonical per-event ops: tfloat
trig/transforms, tint/tfloat/tbigint arithmetic and comparisons, tgeo/
tcbuffer/tnpoint/tpose/trgeometry spatial predicates, h3/quadbin/tjsonb,
geom transforms, span, and text operators. Bbox/topological ops and
non-canonical per-type numeric two-temporal comparisons are intentionally
excluded.

tools/codegen/meos-idl-master.json is the IDL snapshot from MobilityDB
master used to author the descriptor families. tools/codegen/build_descriptor.py
and tools/codegen/build_local.sh support authoring new descriptor families.
This was referenced Jul 2, 2026
This was referenced Jul 2, 2026
@estebanzimanyi

Copy link
Copy Markdown
Member Author

Reconciled into the canonical per-binding generator: the frontier generator (#170) and its regen entrypoint (#175, tools/regen-from-pin.sh + GENERATION.md + compose-order). The NES operator surface is produced by the canonical chain (MEOS-API tools/ecosystem-generate.sh -> run.py catalog -> tools/regen-from-pin.sh -> codegen_nebula.py + codegen_aggregations.py, descriptors derived from the catalog by build_descriptor.py), not a separate runner.

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