Hi all,

MonetDB version: 11.23.7
Ubuntu version: 14.04

I created a new optimizer pipeline by adding an additional optimization step after 'default_pipe', i.e.:
'my_customized_pipe'='optimizer.inline();optimizer.candidates();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.garbageCollector();optimizer.customizedstep()'

What I have done is:
1) Create an empty optimizer step:
    -- 1.1  add opt_customizedstep.c/h in package monetdb/optimizer/*, leave function body OPTcustomizedstepImplementation() empty, i.e. with one statement *return 0*
    -- 1.2 register the step by modifying opt_wrapper.c and optimizer.mal
2) Add the definition of the new pipeline in opt_pipes.c
3) Modify the configuration file to compile the added source files.

After re-build the system, I can enable the new optimizer pipeline by set optimizer='my_customized_pipe'. However, I have two issues: 

i) using EXPLAIN statement, I found the MAL plan different from the one generated by 'default_pipe' (which should be the same since I did nothing in the added step?). Specifically, the plan seems to be not affected by optimizer.reorder() step, i.e., bat.new() and bat.append() instructions appear in the end of the plan.

ii) then I entered mdb mode by DEBUG statement. But it seems that some command did not work as before. For example, *help* command does not display all commands available; *optimizer* command does not display actions performed by each optimizer step.

What's wrong with my procedure to add a new optimizer pipeline? Any comment would be helpful. 

Best regards,
Wenjian