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.

  • Field Details

    • calcite

      private final Calcite calcite
    • schema

      private final org.apache.calcite.schema.SchemaPlus schema
    • lower

      private final boolean lower
  • Constructor Details

    • CalciteForeignValue

      public CalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, boolean lower)
      Creates a CalciteForeignValue.
  • Method Details

    • type

      public Type type(TypeSystem typeSystem)
      Specified by:
      type in interface ForeignValue
    • toType

      private Type toType(org.apache.calcite.schema.SchemaPlus schema, TypeSystem typeSystem)
    • toType

      private Type toType(org.apache.calcite.schema.Table table, TypeSystem typeSystem)
    • convert

      private String convert(String name)
    • convert

      private static String convert(boolean lower, String name)
    • value

      public Object value()
      Specified by:
      value in interface ForeignValue
    • valueFor

      private com.google.common.collect.ImmutableList<Object> valueFor(org.apache.calcite.schema.SchemaPlus schema)
    • plus

      private static <E> List<E> plus(List<E> list, E e)
      Returns a copy of a list with one element appended.