Documentation
¶
Index ¶
- type AbstractExpression
- type AggregateValueExpression
- func (a *AggregateValueExpression) Evaluate(tuple *tuple.Tuple, schema *schema.Schema) types.Value
- func (a *AggregateValueExpression) EvaluateAggregate(group_bys []*types.Value, aggregates []*types.Value) types.Value
- func (a *AggregateValueExpression) EvaluateJoin(left_tuple *tuple.Tuple, left_schema *schema.Schema, right_tuple *tuple.Tuple, ...) types.Value
- func (a *AggregateValueExpression) GetChildAt(child_idx uint32) Expression
- func (a *AggregateValueExpression) GetReturnType() types.TypeID
- type ColumnValue
- func (c *ColumnValue) Evaluate(tuple *tuple.Tuple, schema *schema.Schema) types.Value
- func (c *ColumnValue) EvaluateAggregate(group_bys []*types.Value, aggregates []*types.Value) types.Value
- func (c *ColumnValue) EvaluateJoin(left_tuple *tuple.Tuple, left_schema *schema.Schema, right_tuple *tuple.Tuple, ...) types.Value
- func (c *ColumnValue) GetChildAt(child_idx uint32) Expression
- func (c *ColumnValue) GetReturnType() types.TypeID
- func (c *ColumnValue) SetColIndex(colIndex uint32)
- func (c *ColumnValue) SetReturnType(valueType types.TypeID)
- func (c *ColumnValue) SetTupleIndex(tupleIndex uint32)
- type Comparison
- func (c *Comparison) Evaluate(tuple_ *tuple.Tuple, schema_ *schema.Schema) types.Value
- func (c *Comparison) EvaluateAggregate(group_bys []*types.Value, aggregates []*types.Value) types.Value
- func (c *Comparison) EvaluateJoin(left_tuple *tuple.Tuple, left_schema *schema.Schema, right_tuple *tuple.Tuple, ...) types.Value
- func (c *Comparison) GetChildAt(child_idx uint32) Expression
- func (c *Comparison) GetComparisonType() ComparisonType
- func (c *Comparison) GetLeftSideColIdx() uint32
- func (c *Comparison) GetRightSideValue(tuple_ *tuple.Tuple, schema_ *schema.Schema) types.Value
- func (c *Comparison) SetChildAt(child_idx uint32, child Expression)
- type ComparisonType
- type ConstantValue
- func (c *ConstantValue) Evaluate(tuple *tuple.Tuple, schema *schema.Schema) types.Value
- func (c *ConstantValue) EvaluateAggregate(group_bys []*types.Value, aggregates []*types.Value) types.Value
- func (c *ConstantValue) EvaluateJoin(left_tuple *tuple.Tuple, left_schema *schema.Schema, right_tuple *tuple.Tuple, ...) types.Value
- func (c *ConstantValue) GetChildAt(child_idx uint32) Expression
- type Expression
- func NewAggregateValueExpression(is_group_by_term bool, term_idx uint32, ret_type types.TypeID) Expression
- func NewColumnValue(tupleIndex uint32, colIndex uint32, colType types.TypeID) Expression
- func NewComparison(left Expression, right Expression, comparisonType ComparisonType, ...) Expression
- func NewConstantValue(value types.Value, colType types.TypeID) Expression
- func NewLogicalOp(left Expression, right Expression, logicalOpType LogicalOpType, ...) Expression
- type LogicalOp
- func (c *LogicalOp) Evaluate(tuple *tuple.Tuple, schema *schema.Schema) types.Value
- func (c *LogicalOp) EvaluateAggregate(group_bys []*types.Value, aggregates []*types.Value) types.Value
- func (c *LogicalOp) EvaluateJoin(left_tuple *tuple.Tuple, left_schema *schema.Schema, right_tuple *tuple.Tuple, ...) types.Value
- func (c *LogicalOp) GetChildAt(child_idx uint32) Expression
- func (c *LogicalOp) GetLogicalOpType() LogicalOpType
- func (c *LogicalOp) SetChildAt(child_idx uint32, child Expression)
- type LogicalOpType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractExpression ¶
type AbstractExpression struct {
// contains filtered or unexported fields
}
type AggregateValueExpression ¶
type AggregateValueExpression struct { *AbstractExpression // contains filtered or unexported fields }
*
- AggregateValueExpression represents aggregations such as MAX(a), MIN(b), COUNT(c)
func (*AggregateValueExpression) EvaluateAggregate ¶
func (*AggregateValueExpression) EvaluateJoin ¶
func (*AggregateValueExpression) GetChildAt ¶
func (a *AggregateValueExpression) GetChildAt(child_idx uint32) Expression
func (*AggregateValueExpression) GetReturnType ¶
func (a *AggregateValueExpression) GetReturnType() types.TypeID
type ColumnValue ¶
type ColumnValue struct { *AbstractExpression // contains filtered or unexported fields }
*
- ColumnValue maintains the tuple index and column index relative to a particular schema or join.
func (*ColumnValue) EvaluateAggregate ¶
func (*ColumnValue) EvaluateJoin ¶
func (*ColumnValue) GetChildAt ¶
func (c *ColumnValue) GetChildAt(child_idx uint32) Expression
func (*ColumnValue) GetReturnType ¶
func (c *ColumnValue) GetReturnType() types.TypeID
func (*ColumnValue) SetColIndex ¶
func (c *ColumnValue) SetColIndex(colIndex uint32)
func (*ColumnValue) SetReturnType ¶
func (c *ColumnValue) SetReturnType(valueType types.TypeID)
func (*ColumnValue) SetTupleIndex ¶
func (c *ColumnValue) SetTupleIndex(tupleIndex uint32)
type Comparison ¶
type Comparison struct { *AbstractExpression // contains filtered or unexported fields }
*
- ComparisonExpression represents two expressions being compared.
func (*Comparison) EvaluateAggregate ¶
func (*Comparison) EvaluateJoin ¶
func (*Comparison) GetChildAt ¶
func (c *Comparison) GetChildAt(child_idx uint32) Expression
func (*Comparison) GetComparisonType ¶
func (c *Comparison) GetComparisonType() ComparisonType
func (*Comparison) GetLeftSideColIdx ¶
func (c *Comparison) GetLeftSideColIdx() uint32
func (*Comparison) GetRightSideValue ¶
func (*Comparison) SetChildAt ¶
func (c *Comparison) SetChildAt(child_idx uint32, child Expression)
type ComparisonType ¶
type ComparisonType int
const ( Equal ComparisonType = iota NotEqual GreaterThan // A > B GreaterThanOrEqual // A >= B LessThan // A < B LessThanOrEqual // A <= B )
* ComparisonType represents the type of comparison that we want to perform.
type ConstantValue ¶
type ConstantValue struct { *AbstractExpression // contains filtered or unexported fields }
*
- ConstantValue represents constants.
func (*ConstantValue) EvaluateAggregate ¶
func (*ConstantValue) EvaluateJoin ¶
func (*ConstantValue) GetChildAt ¶
func (c *ConstantValue) GetChildAt(child_idx uint32) Expression
type Expression ¶
type Expression interface { Evaluate(*tuple.Tuple, *schema.Schema) types.Value GetChildAt(uint32) Expression EvaluateJoin(*tuple.Tuple, *schema.Schema, *tuple.Tuple, *schema.Schema) types.Value EvaluateAggregate([]*types.Value, []*types.Value) types.Value }
*
- Expression interface is the base of all the expressions in the system.
- Expressions are modeled as trees, i.e. every expression may have a variable number of children.
func NewAggregateValueExpression ¶
func NewAggregateValueExpression(is_group_by_term bool, term_idx uint32, ret_type types.TypeID) Expression
func NewColumnValue ¶
func NewColumnValue(tupleIndex uint32, colIndex uint32, colType types.TypeID) Expression
func NewComparison ¶
func NewComparison(left Expression, right Expression, comparisonType ComparisonType, colType types.TypeID) Expression
func NewConstantValue ¶
func NewConstantValue(value types.Value, colType types.TypeID) Expression
func NewLogicalOp ¶
func NewLogicalOp(left Expression, right Expression, logicalOpType LogicalOpType, colType types.TypeID) Expression
if logicalOpType is "NOT", right value must be nil
type LogicalOp ¶
type LogicalOp struct { *AbstractExpression // contains filtered or unexported fields }
*
- LogicalOp represents two expressions or one expression being evaluated with logical operator.
func (*LogicalOp) EvaluateAggregate ¶
func (*LogicalOp) EvaluateJoin ¶
func (*LogicalOp) GetChildAt ¶
func (c *LogicalOp) GetChildAt(child_idx uint32) Expression
func (*LogicalOp) GetLogicalOpType ¶
func (c *LogicalOp) GetLogicalOpType() LogicalOpType
func (*LogicalOp) SetChildAt ¶
func (c *LogicalOp) SetChildAt(child_idx uint32, child Expression)
type LogicalOpType ¶
type LogicalOpType int
const ( AND LogicalOpType = iota OR NOT )
* LogicalOpType represents the type of comparison that we want to perform.
Click to show internal directories.
Click to hide internal directories.