org.eigenbase.sarg
Interface SargExpr

All Known Implementing Classes:
SargIntervalExpr, SargSetExpr

public interface SargExpr

SargExpr represents an expression defining a possibly non-contiguous search subset of a scalar domain of a given datatype.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sarg/SargExpr.java#9 $
Author:
John V. Sichi

Method Summary
 void collectDynamicParams(Set<RexDynamicParam> dynamicParams)
          Collects all dynamic parameters referenced by this expression.
 SargIntervalSequence evaluate()
          Resolves this expression into a fixed SargIntervalSequence.
 SargIntervalSequence evaluateComplemented()
          Resolves the complement of this expression into a fixed SargIntervalSequence.
 RelDataType getDataType()
           
 SargFactory getFactory()
           
 String toString()
          Overrides the default Object.toString.
 

Method Detail

toString

String toString()
Overrides the default Object.toString. The result must be safe for use in a RelNode digest.

Overrides:
toString in class Object

getDataType

RelDataType getDataType()
Returns:
datatype for coordinates of search domain

evaluate

SargIntervalSequence evaluate()
Resolves this expression into a fixed SargIntervalSequence.

TODO jvs 17-Jan-2006: add binding for dynamic params so they can be evaluated as well

Returns:
immutable ordered sequence of disjoint intervals

evaluateComplemented

SargIntervalSequence evaluateComplemented()
Resolves the complement of this expression into a fixed SargIntervalSequence.

Returns:
immutable ordered sequence of disjoint intervals

getFactory

SargFactory getFactory()
Returns:
the factory which produced this expression

collectDynamicParams

void collectDynamicParams(Set<RexDynamicParam> dynamicParams)
Collects all dynamic parameters referenced by this expression.

Parameters:
dynamicParams - receives dynamic parameter references