Changeset: 578a2b3e9dad for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=578a2b3e9dad Added Files: monetdb5/optimizer/opt_bincopyfrom.c monetdb5/optimizer/opt_bincopyfrom.h Modified Files: monetdb5/optimizer/CMakeLists.txt monetdb5/optimizer/opt_pipes.c monetdb5/optimizer/opt_wrapper.c monetdb5/optimizer/optimizer.c Branch: copybinary Log Message:
My very own MAL optimizer diffs (104 lines): diff --git a/monetdb5/optimizer/CMakeLists.txt b/monetdb5/optimizer/CMakeLists.txt --- a/monetdb5/optimizer/CMakeLists.txt +++ b/monetdb5/optimizer/CMakeLists.txt @@ -31,6 +31,7 @@ target_sources(optimizer opt_matpack.c opt_matpack.h opt_json.c opt_json.h opt_mergetable.c opt_mergetable.h + opt_bincopyfrom.c opt_bincopyfrom.h opt_mitosis.c opt_mitosis.h opt_multiplex.c opt_multiplex.h opt_oltp.c opt_oltp.h diff --git a/monetdb5/optimizer/opt_bincopyfrom.c b/monetdb5/optimizer/opt_bincopyfrom.c new file mode 100644 --- /dev/null +++ b/monetdb5/optimizer/opt_bincopyfrom.c @@ -0,0 +1,26 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. + */ + +/* author Joeri van Ruth + * This optimizer replaces calls to sql.importTable with a series of calls to + * sql.importColumn. + */ +#include "monetdb_config.h" +#include "mal_builder.h" +#include "opt_bincopyfrom.h" + +str +OPTbincopyfromImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) +{ + (void)cntxt; + (void)mb; + (void)stk; + (void)pci; + + return MAL_SUCCEED; +} diff --git a/monetdb5/optimizer/opt_bincopyfrom.h b/monetdb5/optimizer/opt_bincopyfrom.h new file mode 100644 --- /dev/null +++ b/monetdb5/optimizer/opt_bincopyfrom.h @@ -0,0 +1,16 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V. + */ + +#ifndef _OPT_BINCOPYFROM_ +#define _OPT_BINCOPYFROM_ +#include "opt_prelude.h" +#include "opt_support.h" +#include "mal_exception.h" +mal_export str OPTbincopyfromImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p); + +#endif diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c --- a/monetdb5/optimizer/opt_pipes.c +++ b/monetdb5/optimizer/opt_pipes.c @@ -72,6 +72,7 @@ static struct PIPELINES { "optimizer.aliases();" "optimizer.mitosis();" "optimizer.mergetable();" + "optimizer.bincopyfrom();" "optimizer.deadcode();" "optimizer.aliases();" "optimizer.constants();" diff --git a/monetdb5/optimizer/opt_wrapper.c b/monetdb5/optimizer/opt_wrapper.c --- a/monetdb5/optimizer/opt_wrapper.c +++ b/monetdb5/optimizer/opt_wrapper.c @@ -40,6 +40,7 @@ #include "opt_oltp.h" #include "opt_postfix.h" #include "opt_mergetable.h" +#include "opt_bincopyfrom.h" #include "opt_mitosis.h" #include "opt_multiplex.h" #include "opt_profiler.h" @@ -76,6 +77,7 @@ struct{ {"json", &OPTjsonImplementation,0,0}, {"matpack", &OPTmatpackImplementation,0,0}, {"mergetable", &OPTmergetableImplementation,0,0}, + {"bincopyfrom", &OPTbincopyfromImplementation,0,0}, {"mitosis", &OPTmitosisImplementation,0,0}, {"multiplex", &OPTmultiplexImplementation,0,0}, {"oltp", &OPToltpImplementation,0,0}, diff --git a/monetdb5/optimizer/optimizer.c b/monetdb5/optimizer/optimizer.c --- a/monetdb5/optimizer/optimizer.c +++ b/monetdb5/optimizer/optimizer.c @@ -114,6 +114,7 @@ static mel_func optimizer_init_funcs[] = pattern("optimizer", "orcam", OPTorcam, false, "Inverse macro processor for current function", args(1,3, arg("",void),arg("targetmod",str),arg("targetfcn",str))), pattern("optimizer", "orcam", OPTorcam, false, "Inverse macro, find pattern and replace with a function call.", args(1,5, arg("",void),arg("mod",str),arg("fcn",str),arg("targetmod",str),arg("targetfcn",str))), optwrapper_pattern("mergetable", "Resolve the multi-table definitions"), + optwrapper_pattern("bincopyfrom", "Parallellize column loading"), optwrapper_pattern("mitosis", "Modify the plan to exploit parallel processing on multiple cores"), optwrapper_pattern("multiplex", "Compiler for multiplexed instructions"), optwrapper_pattern("matpack", "Unroll the mat.pack operation"), _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list