|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.CallingConvention
public class CallingConvention
CallingConvention
enumerates the calling conventions built in to
the Saffron project. This set can be extended by applications by defining new
instances of CallingConvention and registering them with a planner, along
with the desired conversion rules. Extended ordinals must be greater than
CallingConvention.enumeration.getMax().
Field Summary | |
---|---|
static CallingConvention |
ARRAY
|
static int |
ARRAY_ORDINAL
The ARRAY calling convention results in a Java expression
which evaluates to an array containing the rows returned. |
static CallingConvention |
COLLECTION
|
static int |
COLLECTION_ORDINAL
The COLLECTION calling convention results in a Java
expression which evaluates to a Collection , typically a
ArrayList . |
static CallingConvention |
ENUMERATION
|
static int |
ENUMERATION_ORDINAL
|
static CallingConvention |
EXISTS
|
static int |
EXISTS_ORDINAL
The EXISTS calling convention is only allowed for a
terminator. |
static CallingConvention |
HASHTABLE
|
static int |
HASHTABLE_ORDINAL
|
private Class |
interfaze
Interface that a relational expression of this calling convention must implement. |
static CallingConvention |
ITERABLE
|
static int |
ITERABLE_ORDINAL
The ITERABLE calling convention means that the expression is
converted to an openjava expression (Expression )
which evalutes to an object which implements Iterable . |
static CallingConvention |
ITERATOR
|
static int |
ITERATOR_ORDINAL
The ITERATOR calling convention means that the expression is
converted to an openjava expression (Expression )
which evalutes to an TupleIter . |
static CallingConvention |
JAVA
|
static int |
JAVA_ORDINAL
The JAVA calling convention means that the expression is
converted into an Openjava parse tree, which can then be un-parsed,
compiled, and executed as java code. |
static CallingConvention |
MAP
|
static int |
MAP_ORDINAL
|
private static int |
maxOrdinal
|
private String |
name
Enumerated value's name. |
static CallingConvention |
NONE
|
static int |
NONE_ORDINAL
The NONE calling convention means that expression does not
support any calling convention -- in other words, it is not
implementable, and has to be transformed to something else in order to be
implemented. |
private int |
ordinal
Enumerated value's ordinal. |
static CallingConvention |
RESULT_SET
|
static int |
RESULT_SET_ORDINAL
The RESULT_SET calling convention means that the expression
is a JDBC result set . |
static CallingConvention[] |
values
|
static CallingConvention |
VECTOR
|
static int |
VECTOR_ORDINAL
|
Constructor Summary | |
---|---|
CallingConvention(String name,
int ordinal,
Class interfaze)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
Compares this CallingConvention to another for equality by ordinal. |
static int |
generateOrdinal()
|
Class |
getInterface()
|
String |
getName()
|
int |
getOrdinal()
|
RelTraitDef |
getTraitDef()
Returns the RelTraitDef that defines this RelTrait. |
int |
hashCode()
Returns the ordinal as the CallingConvention's hash code. |
String |
toString()
Returns the value's name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static int maxOrdinal
public static final int NONE_ORDINAL
NONE
calling convention means that expression does not
support any calling convention -- in other words, it is not
implementable, and has to be transformed to something else in order to be
implemented.
public static final CallingConvention NONE
public static final int JAVA_ORDINAL
JAVA
calling convention means that the expression is
converted into an Openjava parse tree, which can then be un-parsed,
compiled, and executed as java code.
The JavaRel.implement(org.eigenbase.oj.rel.JavaRelImplementor)
method generates a
piece of code which will call the piece of code corresponding to the
parent once for each row:
JavaRelImplementor.generateParentBody(org.eigenbase.rel.RelNode, openjava.ptree.StatementList)
, which in turn calls JavaLoopRel.implementJavaParent(org.eigenbase.oj.rel.JavaRelImplementor, int)
on the parent.JavaRelImplementor.getStatementList()
).
public static final CallingConvention JAVA
public static final int ITERATOR_ORDINAL
ITERATOR
calling convention means that the expression is
converted to an openjava expression (Expression
)
which evalutes to an TupleIter
. See ConverterRel
.
public static final CallingConvention ITERATOR
public static final int ARRAY_ORDINAL
ARRAY
calling convention results in a Java expression
which evaluates to an array containing the rows returned. Compare with
JAVA_ORDINAL
, where a loop does something for each row
returned).
public static final CallingConvention ARRAY
public static final int COLLECTION_ORDINAL
COLLECTION
calling convention results in a Java
expression which evaluates to a Collection
, typically a
ArrayList
.
public static final CallingConvention COLLECTION
public static final int VECTOR_ORDINAL
public static final CallingConvention VECTOR
public static final int ENUMERATION_ORDINAL
public static final CallingConvention ENUMERATION
public static final int MAP_ORDINAL
public static final CallingConvention MAP
public static final int HASHTABLE_ORDINAL
public static final CallingConvention HASHTABLE
public static final int ITERABLE_ORDINAL
ITERABLE
calling convention means that the expression is
converted to an openjava expression (Expression
)
which evalutes to an object which implements Iterable
.
public static final CallingConvention ITERABLE
public static final int EXISTS_ORDINAL
EXISTS
calling convention is only allowed for a
terminator.
public static final CallingConvention EXISTS
public static final int RESULT_SET_ORDINAL
RESULT_SET
calling convention means that the expression
is a JDBC result set
. When a result set is
converted to another convention such as array or iterator, the default
object type is Row
.
public static final CallingConvention RESULT_SET
public static final CallingConvention[] values
private final String name
private final int ordinal
private final Class interfaze
RelNode
.
Constructor Detail |
---|
public CallingConvention(String name, int ordinal, Class interfaze)
Method Detail |
---|
public Class getInterface()
public static int generateOrdinal()
public String getName()
public int getOrdinal()
public RelTraitDef getTraitDef()
RelTrait
getTraitDef
in interface RelTrait
public int hashCode()
hashCode
in interface RelTrait
hashCode
in class Object
public boolean equals(Object o)
equals
in interface RelTrait
equals
in class Object
o
- the other CallingConvention
public String toString()
toString
in interface RelTrait
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |