Changeset: 26ccf2f217bd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=26ccf2f217bd
Modified Files:
monetdb5/optimizer/opt_pipes.mx
Branch: default
Log Message:
Allow extensions to the pipeline definition
Users (and code like dataflow) can add modified pipelines to the
predefined table.
diffs (47 lines):
diff --git a/monetdb5/optimizer/opt_pipes.mx b/monetdb5/optimizer/opt_pipes.mx
--- a/monetdb5/optimizer/opt_pipes.mx
+++ b/monetdb5/optimizer/opt_pipes.mx
@@ -38,16 +38,19 @@
opt_export str getPipeDefinition(str name);
opt_export str getPipeCatalog(int *ret);
+opt_export str addPipeDefinition(str name, str pipe);
#endif
@c
#include "monetdb_config.h"
#include "opt_pipes.h"
+#define MAXOPTPIPES 64
+
struct PIPELINES{
char name[50];
char def[256];
-} pipes[] ={
+} pipes[MAXOPTPIPES] ={
/* The minimal pipeline necessary by the server to operate correctly*/
{ "minimal_pipe", "inline,remap,deadcode,multiplex,garbageCollector"},
@@ -121,6 +124,22 @@
#include "opt_pipes.h"
str
+addPipeDefinition(str name, str pipe)
+{
+ int i;
+ for( i =0; i< MAXOPTPIPES; i++)
+ if ( pipes[i].name && strcmp(name,pipes[i].name)==0)
+ return NULL;
+ else
+ if ( pipes[i].name == 0){
+ snprintf(pipes[i].name,50,"%s",name);
+ snprintf(pipes[i].def,256,"%s",pipe);
+ return NULL;
+ }
+ return NULL;
+}
+
+str
getPipeDefinition(str name)
{
int i;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list