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 /***********************************************************************
19 *   $Id: filtercommand-jl.cpp 9210 2013-01-21 14:10:42Z rdempsey $
20 *
21 *
22 ***********************************************************************/
23 
24 #include "bpp-jl.h"
25 
26 using namespace std;
27 using namespace messageqcpp;
28 
29 namespace joblist
30 {
31 
FilterCommandJL(const FilterStep & step)32 FilterCommandJL::FilterCommandJL(const FilterStep& step) :
33     fBOP(step.BOP()), fColType(step.colType())
34 {
35     OID = 0;
36     colName = step.name();
37 }
38 
39 
~FilterCommandJL()40 FilterCommandJL::~FilterCommandJL()
41 {
42 }
43 
44 
setLBID(uint64_t rid,uint32_t dbroot)45 void FilterCommandJL::setLBID(uint64_t rid, uint32_t dbroot)
46 {
47 }
48 
49 
getTableColumnType()50 uint8_t FilterCommandJL::getTableColumnType()
51 {
52     throw logic_error("Don't call FilterCommandJL::getTableColumn(); it's not a projection step");
53 }
54 
55 
getCommandType()56 CommandJL::CommandType FilterCommandJL::getCommandType()
57 {
58     return FILTER_COMMAND;
59 }
60 
61 
toString()62 string FilterCommandJL::toString()
63 {
64     ostringstream ret;
65 
66     ret << "FilterCommandJL: " << colName << " BOP=" << (uint32_t) fBOP;
67     return ret.str();
68 }
69 
70 
createCommand(ByteStream & bs) const71 void FilterCommandJL::createCommand(ByteStream& bs) const
72 {
73     bs << (uint8_t) FILTER_COMMAND;
74     bs << fBOP;
75     CommandJL::createCommand(bs);
76 }
77 
78 
runCommand(ByteStream & bs) const79 void FilterCommandJL::runCommand(ByteStream& bs) const
80 {
81 }
82 
83 
getWidth()84 uint16_t FilterCommandJL::getWidth()
85 {
86     return fColType.colWidth;
87 }
88 
89 
90 };
91