Package org.apache.calcite.rel.metadata
Class RelColumnOrigin
- java.lang.Object
-
- org.apache.calcite.rel.metadata.RelColumnOrigin
-
public class RelColumnOrigin extends java.lang.Object
RelColumnOrigin is a data structure describing one of the origins of an output column produced by a relational expression.
-
-
Field Summary
Fields Modifier and Type Field Description private int
iOriginColumn
private boolean
isDerived
private RelOptTable
originTable
-
Constructor Summary
Constructors Constructor Description RelColumnOrigin(RelOptTable originTable, int iOriginColumn, boolean isDerived)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getOriginColumnOrdinal()
RelOptTable
getOriginTable()
int
hashCode()
boolean
isDerived()
Consider the queryselect a+b as c, d as e from t
.
-
-
-
Field Detail
-
originTable
private final RelOptTable originTable
-
iOriginColumn
private final int iOriginColumn
-
isDerived
private final boolean isDerived
-
-
Constructor Detail
-
RelColumnOrigin
public RelColumnOrigin(RelOptTable originTable, int iOriginColumn, boolean isDerived)
-
-
Method Detail
-
getOriginTable
public RelOptTable getOriginTable()
- Returns:
- table of origin
-
getOriginColumnOrdinal
public int getOriginColumnOrdinal()
- Returns:
- 0-based index of column in origin table; whether this ordinal is flattened or unflattened depends on whether UDT flattening has already been performed on the relational expression which produced this description
-
isDerived
public boolean isDerived()
Consider the queryselect a+b as c, d as e from t
. The output column c has two origins (a and b), both of them derived. The output column d as one origin (c), which is not derived.- Returns:
- false if value taken directly from column in origin table; true otherwise
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-