OmniSciDB  72180abbfe
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelFilter Class Reference

#include <RelAlgDagBuilder.h>

+ Inheritance diagram for RelFilter:
+ Collaboration diagram for RelFilter:

Public Member Functions

 RelFilter (std::unique_ptr< const RexScalar > &filter, std::shared_ptr< const RelAlgNode > input)
 
const RexScalargetCondition () const
 
const RexScalargetAndReleaseCondition ()
 
void setCondition (std::unique_ptr< const RexScalar > &condition)
 
size_t size () const override
 
void replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input) override
 
std::string toString () const override
 
std::shared_ptr< RelAlgNodedeepCopy () const override
 
- Public Member Functions inherited from RelAlgNode
 RelAlgNode (RelAlgInputs inputs={})
 
virtual ~RelAlgNode ()
 
void resetQueryExecutionState ()
 
void setContextData (const void *context_data) const
 
void setOutputMetainfo (const std::vector< TargetMetaInfo > &targets_metainfo) const
 
const std::vector
< TargetMetaInfo > & 
getOutputMetainfo () const
 
unsigned getId () const
 
bool hasContextData () const
 
const void * getContextData () const
 
const size_t inputCount () const
 
const RelAlgNodegetInput (const size_t idx) const
 
std::shared_ptr< const RelAlgNodegetAndOwnInput (const size_t idx) const
 
void addManagedInput (std::shared_ptr< const RelAlgNode > input)
 
bool hasInput (const RelAlgNode *needle) const
 
bool isNop () const
 
void markAsNop ()
 

Private Attributes

std::unique_ptr< const RexScalarfilter_
 

Additional Inherited Members

- Static Public Member Functions inherited from RelAlgNode
static void resetRelAlgFirstId () noexcept
 
- Protected Attributes inherited from RelAlgNode
RelAlgInputs inputs_
 
const unsigned id_
 

Detailed Description

Definition at line 1172 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

RelFilter::RelFilter ( std::unique_ptr< const RexScalar > &  filter,
std::shared_ptr< const RelAlgNode input 
)
inline

Definition at line 1174 of file RelAlgDagBuilder.h.

References CHECK(), and RelAlgNode::inputs_.

1176  : filter_(std::move(filter)) {
1177  CHECK(filter_);
1178  inputs_.push_back(input);
1179  }
CHECK(cgen_state)
std::unique_ptr< const RexScalar > filter_
RelAlgInputs inputs_

+ Here is the call graph for this function:

Member Function Documentation

std::shared_ptr< RelAlgNode > RelFilter::deepCopy ( ) const
overridevirtual

Implements RelAlgNode.

Definition at line 362 of file RelAlgDagBuilder.cpp.

References filter_, RelAlgNode::inputs_, and RexVisitorBase< T >::visit().

362  {
363  RexDeepCopyVisitor copier;
364  auto filter_copy = copier.visit(filter_.get());
365  return std::make_shared<RelFilter>(filter_copy, inputs_[0]);
366 }
virtual T visit(const RexScalar *rex_scalar) const
Definition: RexVisitor.h:27
std::unique_ptr< const RexScalar > filter_
RelAlgInputs inputs_

+ Here is the call graph for this function:

const RexScalar* RelFilter::getAndReleaseCondition ( )
inline

Definition at line 1183 of file RelAlgDagBuilder.h.

1183 { return filter_.release(); }
std::unique_ptr< const RexScalar > filter_
const RexScalar* RelFilter::getCondition ( ) const
inline

Definition at line 1181 of file RelAlgDagBuilder.h.

Referenced by RelAlgExecutor::createFilterWorkUnit(), hoist_filter_cond_to_cross_join(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitFilter().

1181 { return filter_.get(); }
std::unique_ptr< const RexScalar > filter_

+ Here is the caller graph for this function:

void RelFilter::replaceInput ( std::shared_ptr< const RelAlgNode old_input,
std::shared_ptr< const RelAlgNode input 
)
overridevirtual

Reimplemented from RelAlgNode.

Definition at line 315 of file RelAlgDagBuilder.cpp.

References filter_, and RelAlgNode::replaceInput().

316  {
317  RelAlgNode::replaceInput(old_input, input);
318  RexRebindInputsVisitor rebind_inputs(old_input.get(), input.get());
319  rebind_inputs.visit(filter_.get());
320 }
std::unique_ptr< const RexScalar > filter_
virtual void replaceInput(std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input)

+ Here is the call graph for this function:

void RelFilter::setCondition ( std::unique_ptr< const RexScalar > &  condition)
inline

Definition at line 1185 of file RelAlgDagBuilder.h.

References CHECK().

Referenced by hoist_filter_cond_to_cross_join().

1185  {
1186  CHECK(condition);
1187  filter_ = std::move(condition);
1188  }
CHECK(cgen_state)
std::unique_ptr< const RexScalar > filter_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t RelFilter::size ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1190 of file RelAlgDagBuilder.h.

References RelAlgNode::inputs_.

1190 { return inputs_[0]->size(); }
RelAlgInputs inputs_
std::string RelFilter::toString ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1195 of file RelAlgDagBuilder.h.

References run_benchmark_import::result, and to_string().

1195  {
1196  std::string result =
1197  "(RelFilter<" + std::to_string(reinterpret_cast<uint64_t>(this)) + ">(";
1198  result += filter_ ? filter_->toString() : "null";
1199  return result + "))";
1200  }
std::string to_string(char const *&&v)
std::unique_ptr< const RexScalar > filter_

+ Here is the call graph for this function:

Member Data Documentation

std::unique_ptr<const RexScalar> RelFilter::filter_
private

Definition at line 1205 of file RelAlgDagBuilder.h.

Referenced by deepCopy(), and replaceInput().


The documentation for this class was generated from the following files: