1. The executor I've ever found the executor of postgreSQL at src\backend\executor, but cannot make sure where it is like that in MonetDB src.
MonetDB is not PostgresSQL. MonetDB has a completely different architecture, both as a DBMS and as software package (see website & research papers for details).
I don't even know what the "executor" of PostgreSQl is, let alone what it is used for.
Having also done some work using PostgreSQL, I'd say the MAL interpreter has a rough similarity with the PostgreSQL executor as far as both components will take some internal representation on how to acquire the query result and execute it to create the result. However, the comparison does not go very far as both database engines have substantially different architectures. Some notable differences are: MonetDB normally works on complete columns for high-speed bulk processing. Because of this, the MAL interpreter's plan execution will result in a fully materialized result set, while the row-based PostgreSQL executor expects results to be pulled from it row by row. Also, while the PostgreSQL executor does perform some local optimizations, MonetDB will do both global and local optimizations in different optimization pipeline components, before running the MAL interpreter. Best regards, Isidor