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: jlf_execplantojoblist.h 9210 2013-01-21 14:10:42Z rdempsey $ 20 * 21 * 22 ***********************************************************************/ 23 24 /** @file jlf_execplantojoblist.h 25 * 26 */ 27 #ifndef JLF_EXECPLANTOJOBLIST_H__ 28 #define JLF_EXECPLANTOJOBLIST_H__ 29 30 #include "calpontexecutionplan.h" 31 #include "calpontselectexecutionplan.h" 32 #include "calpontsystemcatalog.h" 33 34 35 #include "jlf_common.h" 36 37 namespace joblist 38 { 39 40 //------------------------------------------------------------------------------ 41 /** @brief Class makes initial pass at converting Calpont Exec Plan to a joblist 42 * 43 */ 44 //------------------------------------------------------------------------------ 45 class JLF_ExecPlanToJobList 46 { 47 public: 48 /** @brief This function is the entry point into CEP to joblist conversion 49 * 50 * @param ParseTree (in) is CEP to be translated to a joblist 51 * @param JobInfo& (in/out) is the JobInfo reference that is loaded 52 */ 53 static void walkTree(execplan::ParseTree* n, JobInfo& jobInfo); 54 55 /** @brief This function add new job steps to the job step vector in JobInfo 56 * 57 * @param JobStepVector& (in) is a vector of new job steps 58 * @param JobInfo& (in/out) is the JobInfo reference that is loaded 59 * @param bool (in) is combine job step possible 60 */ 61 static void addJobSteps(JobStepVector& nsv, JobInfo& jobInfo, bool tryCombine); 62 63 private: 64 // Disable constructor since this class only contains a static method 65 JLF_ExecPlanToJobList(); 66 }; 67 68 } // end of joblist namespace 69 70 #endif 71