Class CalciteForeignValue

  • All Implemented Interfaces:
    ForeignValue

    public class CalciteForeignValue
    extends java.lang.Object
    implements ForeignValue
    Value based on a Calcite schema.

    In ML, it appears as a record with a field for each table.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean lower  
      private org.apache.calcite.tools.RelBuilder relBuilder  
      private org.apache.calcite.schema.SchemaPlus schema  
    • Constructor Summary

      Constructors 
      Constructor Description
      CalciteForeignValue​(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 java.lang.String convert​(java.lang.String name)  
      private static <E> java.util.List<E> plus​(java.util.List<E> list, E e)
      Returns a copy of a list with one element appended.
      private static org.apache.calcite.schema.SchemaPlus rootSchema​(org.apache.calcite.schema.SchemaPlus schema)  
      private CalciteForeignValue.FieldConverter toType​(org.apache.calcite.rel.type.RelDataTypeField field)  
      private Type toType​(org.apache.calcite.schema.Table table, TypeSystem typeSystem)  
      Type type​(TypeSystem typeSystem)  
      java.lang.Object value()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • schema

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

        private final boolean lower
      • relBuilder

        private final org.apache.calcite.tools.RelBuilder relBuilder
    • Constructor Detail

      • CalciteForeignValue

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

      • rootSchema

        private static org.apache.calcite.schema.SchemaPlus rootSchema​(org.apache.calcite.schema.SchemaPlus schema)
      • toType

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

        private java.lang.String convert​(java.lang.String name)
      • value

        public java.lang.Object value()
        Specified by:
        value in interface ForeignValue
      • plus

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