Package cascading.lingual.catalog

Examples of cascading.lingual.catalog.TableDef


    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    String tableName = getOptions().getTableName();
    SchemaDef schemaDef = getSchemaDefChecked( catalog, schemaName, true );
    TableDef tableDef = schemaDef.getTableChecked( tableName );

    String addURI = getOptions().getAddOrUpdateURI();

    if( addURI != null )
      tableDef.setIdentifier( addURI );

    String stereotypeName = getOptions().getStereotypeName();

    if( stereotypeName != null )
      tableDef.setStereotypeName( stereotypeName );

    Protocol protocol = Protocol.getProtocol( getOptions().getProtocolName() );

    if( protocol != null )
      tableDef.setProtocol( protocol );

    Format format = Format.getFormat( getOptions().getFormatName() );

    if( format != null )
      tableDef.setFormat( format );

    return asList( tableName );
    }
View Full Code Here


    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    String tableName = getOptions().getTableName();

    SchemaDef schemaDef = getSchemaDefChecked( catalog, schemaName, true );
    TableDef tableDef = schemaDef.getTableChecked( tableName );

    return new TableBuilder().format( tableDef );
    }
View Full Code Here

    for( Ref head : branch.heads.keySet() )
      {
      Stereotype<Protocol, Format> stereotypeFor;

      TableDef tableDef = head.tableDef;

      if( tableDef == null )
        {
        stereotypeFor = catalogManager.findStereotypeFor( head.fields ); // do not use head name
        // local insert case
        if ( stereotypeFor == null )
          stereotypeFor = branch.tailTableDef.getStereotype();
        }
       else
        stereotypeFor = tableDef.getStereotype();

      lingualFlowFactory.setSourceStereotype( head.name, stereotypeFor );

      if( tableDef != null )
        addHandlers( lingualFlowFactory, tableDef.getParentSchema() );
      }

    if( branch.tailTableDef != null )
      lingualFlowFactory.setSinkStereotype( branch.current.getName(), branch.tailTableDef.getStereotype() );
    else
View Full Code Here

    SchemaCatalogManager catalog = platformBroker.getCatalogManager();

    if( catalog == null )
      return super.getRows();

    TableDef tableDef = getTapTable().getTableDef();

    try
      {
      Tap tap = catalog.createTapFor( tableDef, SinkMode.KEEP );
View Full Code Here

        }

      name = split[ split.length - 1 ];

      Stereotype stereotype = new Stereotype( name, function.apply( tap ) );
      TableDef tableDef = new TableDef( currentSchemaDef, name, tap.getIdentifier(), stereotype );

      currentSchemaDef.addStereotype( stereotype );
      currentTapSchema.addTapTableFor( tableDef, getDefaultSchema() == null );
      }
    }
View Full Code Here

  @Override
  public Branch visitChild( Stack stack )
    {
    PlatformBroker platformBroker = getPlatformBroker();
    TableDef tableDef = getTapTable().getTableDef();

    return new Branch( platformBroker, tableDef, getTuples() );
    }
View Full Code Here

    }

  protected Protocol getDefaultProtocolFor( SchemaDef schemaDef, String identifier )
    {
    // not using root by default in case identifier is registered with multiple tables
    TableDef table = schemaDef.findTableFor( identifier );

    if( table != null && table.getProtocol() != null )
      return table.getActualProtocol();

    Protocol protocol = ProtocolProperties.findProtocolFor( schemaDef, identifier );

    if( protocol == null )
      protocol = schemaDef.findDefaultProtocol();
View Full Code Here

    }

  protected Format getDefaultFormatFor( SchemaDef schemaDef, String identifier )
    {
    // not using root by default in case identifier is registered with multiple tables
    TableDef tableDef = schemaDef.findTableFor( identifier );

    // return declared format by given table
    if( tableDef != null && tableDef.getFormat() != null )
      return tableDef.getActualFormat();

    Format format = FormatProperties.findFormatFor( schemaDef, identifier );

    if( format == null )
      format = schemaDef.findDefaultFormat();
View Full Code Here

  @Override
  public Result implement( EnumerableRelImplementor implementor, Prefer pref )
    {
    LOG.debug( "implementing enumerable" );

    TableDef tableDef = getTapTable().getTableDef();

    VolcanoPlanner planner = (VolcanoPlanner) getCluster().getPlanner();

    if( pref == Prefer.CUSTOM )
      throw new RuntimeException( "cannot return custom format" );
View Full Code Here

  @Override
  public Branch visitChild( Stack stack )
    {
    Branch branch = ( (CascadingRelNode) getChild() ).visitChild( stack );
    TableDef tableDef = getTapTable().getTableDef();

    return new Branch( getPlatformBroker(), branch, tableDef );
    }
View Full Code Here

TOP

Related Classes of cascading.lingual.catalog.TableDef

Copyright © 2018 www.massapicom. 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.