org.eigenbase.rel
Class AggregateCall

java.lang.Object
  extended by org.eigenbase.rel.AggregateCall

public class AggregateCall
extends Object

Call to an aggregation function within an AggregateRel.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/rel/AggregateCall.java#7 $
Author:
jhyde

Field Summary
private  Aggregation aggregation
           
private  List<Integer> argList
           
 int[] args
          Deprecated. todo: change all public uses to use getArgList(), then make private
private  boolean distinct
           
private  String name
           
private  RelDataType type
           
 
Constructor Summary
AggregateCall(Aggregation aggregation, boolean distinct, List<Integer> argList, RelDataType type, String name)
          Creates an AggregateCall.
 
Method Summary
 AggregateRelBase.AggCallBinding createBinding(AggregateRelBase aggregateRelBase)
          Creates a binding of this call in the context of an AggregateRel, which can then be used to infer the return type.
 boolean equals(Object o)
           
 Aggregation getAggregation()
          Returns the Aggregation.
 List<Integer> getArgList()
          Returns the ordinals of the arguments to this call.
 String getName()
          Returns the name.
 RelDataType getType()
          Returns the result type.
 int hashCode()
           
 boolean isDistinct()
          Returns whether this AggregateCall is distinct, as in COUNT(DISTINCT empno).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

aggregation

private final Aggregation aggregation

args

public final int[] args
Deprecated. todo: change all public uses to use getArgList(), then make private
TODO jvs 24-Apr-2006: make this array and its contents immutable


distinct

private final boolean distinct

type

private final RelDataType type

name

private final String name

argList

private final List<Integer> argList
Constructor Detail

AggregateCall

public AggregateCall(Aggregation aggregation,
                     boolean distinct,
                     List<Integer> argList,
                     RelDataType type,
                     String name)
Creates an AggregateCall.

Parameters:
aggregation - Aggregation
distinct - Whether distinct
argList - List of ordinals of arguments
type - Result type
name - Name
Method Detail

isDistinct

public final boolean isDistinct()
Returns whether this AggregateCall is distinct, as in COUNT(DISTINCT empno).

Returns:
whether distinct

getAggregation

public final Aggregation getAggregation()
Returns the Aggregation.

Returns:
aggregation

getArgList

public final List<Integer> getArgList()
Returns the ordinals of the arguments to this call.

The list is immutable.

Returns:
list of argument ordinals

getType

public final RelDataType getType()
Returns the result type.

Returns:
result type

getName

public String getName()
Returns the name.

Returns:
name

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

createBinding

public AggregateRelBase.AggCallBinding createBinding(AggregateRelBase aggregateRelBase)
Creates a binding of this call in the context of an AggregateRel, which can then be used to infer the return type.