Package net.hydromatic.morel.foreign
Class CalciteForeignValue
- java.lang.Object
-
- net.hydromatic.morel.foreign.CalciteForeignValue
-
- All Implemented Interfaces:
ForeignValue
public class CalciteForeignValue extends Object implements ForeignValue
Value based on a Calcite schema.In ML, it appears as a record with a field for each table.
-
-
Constructor Summary
Constructors Constructor Description CalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, boolean lower)Creates a CalciteForeignValue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static Stringconvert(boolean lower, String name)private Stringconvert(String name)private static <E> List<E>plus(List<E> list, E e)Returns a copy of a list with one element appended.private TypetoType(org.apache.calcite.schema.SchemaPlus schema, TypeSystem typeSystem)private TypetoType(org.apache.calcite.schema.Table table, TypeSystem typeSystem)Typetype(TypeSystem typeSystem)Objectvalue()private com.google.common.collect.ImmutableList<Object>valueFor(org.apache.calcite.schema.SchemaPlus schema)
-
-
-
Field Detail
-
calcite
private final Calcite calcite
-
schema
private final org.apache.calcite.schema.SchemaPlus schema
-
lower
private final boolean lower
-
-
Constructor Detail
-
CalciteForeignValue
public CalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, boolean lower)
Creates a CalciteForeignValue.
-
-
Method Detail
-
type
public Type type(TypeSystem typeSystem)
- Specified by:
typein interfaceForeignValue
-
toType
private Type toType(org.apache.calcite.schema.SchemaPlus schema, TypeSystem typeSystem)
-
toType
private Type toType(org.apache.calcite.schema.Table table, TypeSystem typeSystem)
-
value
public Object value()
- Specified by:
valuein interfaceForeignValue
-
valueFor
private com.google.common.collect.ImmutableList<Object> valueFor(org.apache.calcite.schema.SchemaPlus schema)
-
-