Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/cogadb/include/query_processing/scan_operator.hpp
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <query_processing/definitions.hpp>
00004 #include <persistence/storage_manager.hpp>
00005 
00006 namespace CoGaDB {
00007     namespace query_processing {
00008         namespace physical_operator {
00009 
00010             class scan_operator : public hype::queryprocessing::UnaryOperator<TablePtr, TablePtr> {
00011                                 public:
00012                                         typedef hype::queryprocessing::OperatorMapper_Helper_Template<TablePtr>::TypedOperatorPtr TypedOperatorPtr;
00013                                         scan_operator(const hype::SchedulingDecision& sched_dec, TablePtr table);
00014                                         virtual bool execute();
00015                                         virtual ~scan_operator();
00016                                 private:
00017                                         TablePtr table_;
00018                         };
00019 
00020                         Physical_Operator_Map_Ptr map_init_function_scan_operator();
00021                         TypedOperatorPtr create_scan_operator(TypedLogicalNode& logical_node, const hype::SchedulingDecision&, TypedOperatorPtr left_child, TypedOperatorPtr right_child);
00022                         
00023                 }//end namespace physical_operator
00024 
00025                 //extern Map_Init_Function init_function_scan_operator;
00026 
00027                 //Map_Init_Function init_function_scan_operator=physical_operator::map_init_function_scan_operator; //boost::bind();
00028 
00029                 //Map_Init_Function getMap_Init_Function_Scan_Operation();
00030 
00031         namespace logical_operator {
00032 
00033                         class Logical_Scan : public hype::queryprocessing::TypedNode_Impl<TablePtr, physical_operator::map_init_function_scan_operator> //init_function_scan_operator> //init_function_scan_operator>
00034                         {
00035                                 public:
00036                                         Logical_Scan(std::string table_name);
00037                                         Logical_Scan(TablePtr table);
00038                                         
00039                                         virtual unsigned int getOutputResultSize() const;
00040                                         
00041                 virtual double getCalculatedSelectivity() const;
00042                                         
00043                                         virtual std::string getOperationName() const;
00044                                         
00045                                         virtual std::string toString(bool verbose) const;
00046                                         
00047                                         const std::string& getTableName();
00048                                         
00049                                         const TablePtr getTablePtr();
00050                                         
00051                                         virtual TypedOperatorPtr getOptimalOperator(TypedOperatorPtr left_child, TypedOperatorPtr right_child, hype::DeviceTypeConstraint dev_constr);
00052                                         
00053                                 private:                                                
00054                                         TablePtr table_;
00055                         };
00056 
00057                 }//end namespace logical_operator
00058 
00059         }//end namespace query_processing
00060 
00061 }; //end namespace CogaDB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines