Package org.apache.calcite.rel.core
Class CorrelationId
java.lang.Object
org.apache.calcite.rel.core.CorrelationId
- All Implemented Interfaces:
Cloneable
,Comparable<CorrelationId>
Describes the necessary parameters for an implementation in order to
identify and set dynamic variables.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Prefix to the name of correlating variables. -
Constructor Summary
ConstructorDescriptionCorrelationId
(int id) Creates a correlation identifier.CorrelationId
(String name) Creates a correlation identifier from a name. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(CorrelationId other) boolean
int
getId()
Returns the identifier.getName()
Returns the preferred name of the variable.int
hashCode()
names
(Set<CorrelationId> set) Converts a set of names to a set of correlation ids.static com.google.common.collect.ImmutableSet<CorrelationId>
Converts a set of correlation ids to a set of names.toString()
-
Field Details
-
CORREL_PREFIX
Prefix to the name of correlating variables.- See Also:
-
-
Constructor Details
-
CorrelationId
public CorrelationId(int id) Creates a correlation identifier. This is a type-safe wrapper over int.- Parameters:
id
- Identifier
-
CorrelationId
Creates a correlation identifier from a name.- Parameters:
name
- variable name
-
-
Method Details
-
getId
public int getId()Returns the identifier.- Returns:
- identifier
-
getName
Returns the preferred name of the variable.- Returns:
- name
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CorrelationId>
-
hashCode
public int hashCode() -
equals
-
setOf
Converts a set of correlation ids to a set of names. -
names
Converts a set of names to a set of correlation ids.
-