1 /* Copyright (C) 2014 InfiniDB, Inc.
2
3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU General Public License
5 as published by the Free Software Foundation; version 2 of
6 the License.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16 MA 02110-1301, USA. */
17
18 // $Id: tdriver1.cpp 9210 2013-01-21 14:10:42Z rdempsey $
19 #include <iostream>
20 using namespace std;
21
22 #include "jobstep.h"
23 #include "distributedenginecomm.h"
24 #include "bandeddl.h"
25 using namespace joblist;
26
27 #include "calpontsystemcatalog.h"
28 using namespace execplan;
29
main(int argc,char ** argv)30 int main(int argc, char** argv)
31 {
32 DistributedEngineComm* dec;
33 boost::shared_ptr<CalpontSystemCatalog> cat;
34
35 ResourceManager rm;
36 dec = DistributedEngineComm::instance(rm);
37 cat = CalpontSystemCatalog::makeCalpontSystemCatalog();
38
39 JobStepAssociation inJs;
40 JobStepAssociation outJs;
41
42 AnyDataListSPtr spdl1(new AnyDataList());
43 FifoDataList* dl1 = new FifoDataList(1, 128);
44 spdl1->fifoDL(dl1);
45 outJs.outAdd(spdl1);
46
47 pColScanStep step0(inJs, outJs, dec, cat, 1003, 1000, 12345, 999, 7, 0, 0, rm);
48 int8_t cop;
49 int64_t filterValue;
50 cop = COMPARE_GE;
51 filterValue = 3010;
52 step0.addFilter(cop, filterValue);
53 cop = COMPARE_LE;
54 filterValue = 3318;
55 step0.addFilter(cop, filterValue);
56 step0.setBOP(BOP_AND);
57 inJs = outJs;
58
59 step0.run();
60
61 step0.join();
62
63 DeliveryStep step1(inJs, outJs, make_table("CALPONTSYS", "SYSTABLE"), cat, 1000, 0, 1, 0);
64 inJs = outJs;
65
66 step1.run();
67
68 step1.join();
69
70 return 0;
71 }
72
73