Examples of FieldTypeFactory


Examples of cascading.lingual.optiq.FieldTypeFactory

  private final TapSchema rootMapSchema;

  LingualContext( SQLPlanner sqlPlanner, Flow flowDef, PlatformBroker platformBroker )
    {
    this.sqlPlanner = sqlPlanner;
    this.rootMapSchema = new TapSchema( new FlowQueryProvider(), new FieldTypeFactory(), platformBroker );

    initializeSchema( sqlPlanner, flowDef, rootMapSchema );
    }
View Full Code Here

Examples of cascading.lingual.optiq.FieldTypeFactory

    }

  @Override
  public JavaTypeFactory getTypeFactory()
    {
    return new FieldTypeFactory();
    }
View Full Code Here

Examples of cascading.lingual.optiq.FieldTypeFactory

  @Override
  protected Table<Integer, Comparable, Object> createTable( TupleEntryIterator entryIterator, boolean useOrdinal )
    {
    Table<Integer, Comparable, Object> table = createNullableTable();

    JavaTypeFactory typeFactory = new FieldTypeFactory();
    int row = 0;
    while( entryIterator.hasNext() )
      {
      TupleEntry entry = entryIterator.next();

      for( Comparable field : entry.getFields() )
        {
        // we must coerce into the actual sql type returned by the result-set
        Object value = entry.getObject( field );
        int columnPos = entry.getFields().getPos( field );
        Type type = entry.getFields().getType( columnPos );

        if( type instanceof BasicSqlType )
          {
          value = ( (CoercibleType) type ).coerce( value, typeFactory.getJavaClass( ( (BasicSqlType) type ) ) );

          // for date-time types, the canonical type (int or long) -- chosen for
          // efficient internal processing -- is not what is returned to the
          // end-user from JDBC (java.sql.Date etc.)
          switch( ( (BasicSqlType) type ).getSqlTypeName() )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.