|
HowTo add a new Operator to NES
In this page, we describe the process of how to add a new operator to NES.
The figure above shows the components of the system that a user has to potentially modify to add a new operator to NES.
Rest Endpoint: All requests by the user require a rest end-point such that the user can call this method. If your operator requires a new endpoint, then we have to add it
Query API: To expose your operator to the user, we have to add the operator to the Query.hpp file such that the user can use it.
RewriteRule: If your operator requires a set of rewrite rules that have to be applied on the logical operators (such as push downs) before placing the operators, then a new rule has to be added to the QueryRewritePhase
TypeInference: If your operator requires special treatment to infer the data types, then a specific inference has to be added. However, common interference like for data and operator type are build-in.
Query Placement: If your operator requires special treatment regarding where it is put in the infrastructure, then a specific placement rule has to be added. (@Ankit what is the default? is it required to do?)
Refinement: If your operator requires special treatment after the global query plan is created and before it is deployed, then a refinement rule has to be specified
Transfer Coordinator⇒Worker: Every operator that has to be transferred to the worker has to be serialized at the coordinator and deserialized at the worker. Thus, a new operator requires a (de-)serialization entry in OperatorSerializationUtil.cpp
Translation: Currently, we the Query.hpp as the API but the compiler requires an older version of the API and thus we have to translate the new operators to the old ones in TranslateToLegacyPlanPhase.cpp
ExecutionPlanCreation: If your operator requires a special setup before it is added to the execution plan, then you have to add this to the builder (e.g. setup state or input/output)
Compiler: If your operator requires new functionality that is not already available in the compiler, we have to add a function generateCodeForX to CCodeGenerator.hpp
|