Class CorrelationId

java.lang.Object
org.apache.calcite.rel.core.CorrelationId
All Implemented Interfaces:
Cloneable, Comparable<CorrelationId>

public class CorrelationId extends Object implements Cloneable, Comparable<CorrelationId>
Describes the necessary parameters for an implementation in order to identify and set dynamic variables.
  • Field Details

    • CORREL_PREFIX

      public static final String 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

      public CorrelationId(String name)
      Creates a correlation identifier from a name.
      Parameters:
      name - variable name
  • Method Details

    • getId

      public int getId()
      Returns the identifier.
      Returns:
      identifier
    • getName

      public String getName()
      Returns the preferred name of the variable.
      Returns:
      name
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(CorrelationId other)
      Specified by:
      compareTo in interface Comparable<CorrelationId>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • setOf

      public static com.google.common.collect.ImmutableSet<CorrelationId> setOf(Set<String> set)
      Converts a set of correlation ids to a set of names.
    • names

      public static Set<String> names(Set<CorrelationId> set)
      Converts a set of names to a set of correlation ids.