Examples of TableSource


Examples of com.foundationdb.sql.optimizer.plan.TableSource

        JoinEnumerator.addTables(joins, tables);
        Map<Table, TableSource> sources = new HashMap<>();

        for (Joinable table: tables) {
            if (table instanceof TableSource) {
                TableSource tableSource = (TableSource)table;
                sources.put(tableSource.getTable().getTable(), tableSource);
            }
        }
       
        for (Joinable table: tables) {
            if (table instanceof TableSource) {
                TableSource tableSource = (TableSource) table;
                checkFKParents (tableSource.getTable().getTable(), tableSource, sources, equivalencies);
            }
        }
    }
View Full Code Here

Examples of com.foundationdb.sql.optimizer.plan.TableSource

    }
   
    private void checkFKParents(Table child, TableSource tableSource,  Map<Table, TableSource> sources, EquivalenceFinder<ColumnExpression> equivelances) {
        for (ForeignKey key : child.getReferencingForeignKeys()) {
            if (checkParentFKIsPK (key, child)) {
                TableSource parentSource = sources.get(key.getReferencedTable());
                if (parentSource == null) {
                    parentSource = generateTableSource(key.getReferencedTable());
                    sources.put(key.getReferencedTable(), parentSource);
                }
                checkFKParents (key.getReferencedTable(), parentSource, sources, equivelances);
View Full Code Here

Examples of com.foundationdb.sql.optimizer.plan.TableSource

        }
        return false;
    }
   
    private TableSource generateTableSource (Table table) {
        return new TableSource (new TableNode (table, new TableTree()), true, table.getName().toString());
    }
View Full Code Here

Examples of com.foundationdb.sql.optimizer.plan.TableSource

    private ColumnExpression expressionFromColumn(Column col, TableSource source) {
       
        if (source == null) {
            Table table = col.getTable();
            TableNode node = new TableNode(table, new TableTree());
            source = new TableSource(node, true, table.getName().toString());
        }
        return new ColumnExpression(source, col);
    }
View Full Code Here

Examples of org.apache.crunch.TableSource

        Source source = From.textFile(filePaths);
        return pipeline.read(source);
      } else {
        // FIXME drop support for this stuff? (doesn't seem to work with spark)
        // TODO: intentionally restrict to only allow org.apache.hadoop.mapreduce.lib.input.TextInputFormat ?
        TableSource source = new FileTableSourceImpl(
            filePaths,
            WritableTypeFamily.getInstance().tableOf(Writables.longs(), Writables.strings()),
            //AvroTypeFamily.getInstance().tableOf(Avros.nulls(), Avros.nulls()),
            //AvroTypeFamily.getInstance().tableOf(Avros.longs(), Avros.generics(opts.inputFileSchema)),
            opts.inputFileFormat);
View Full Code Here

Examples of org.hibernate.metamodel.source.binder.TableSource

  }

  @Override
  public TableSource getPrimaryTable() {
    if ( JaxbJoinedSubclassElement.class.isInstance( entityElement() ) ) {
      return new TableSource() {
        @Override
        public String getExplicitSchemaName() {
          return ( (JaxbJoinedSubclassElement) entityElement() ).getSchema();
        }

        @Override
        public String getExplicitCatalogName() {
          return ( (JaxbJoinedSubclassElement) entityElement() ).getCatalog();
        }

        @Override
        public String getExplicitTableName() {
          return ( (JaxbJoinedSubclassElement) entityElement() ).getTable();
        }

        @Override
        public String getLogicalName() {
          // logical name for the primary table is null
          return null;
        }
      };
    }
    else if ( JaxbUnionSubclassElement.class.isInstance( entityElement() ) ) {
      return new TableSource() {
        @Override
        public String getExplicitSchemaName() {
          return ( (JaxbUnionSubclassElement) entityElement() ).getSchema();
        }
View Full Code Here

Examples of org.hibernate.metamodel.source.binder.TableSource

    return new Caching( region, accessType, cacheLazyProps );
  }

  @Override
  public TableSource getPrimaryTable() {
    return new TableSource() {
      @Override
      public String getExplicitSchemaName() {
        return entityElement().getSchema();
      }
View Full Code Here

Examples of org.hibernate.metamodel.source.binder.TableSource

  }

  @Override
  public TableSource getPrimaryTable() {
    if ( XMLJoinedSubclassElement.class.isInstance( entityElement() ) ) {
      return new TableSource() {
        @Override
        public String getExplicitSchemaName() {
          return ( (XMLJoinedSubclassElement) entityElement() ).getSchema();
        }

        @Override
        public String getExplicitCatalogName() {
          return ( (XMLJoinedSubclassElement) entityElement() ).getCatalog();
        }

        @Override
        public String getExplicitTableName() {
          return ( (XMLJoinedSubclassElement) entityElement() ).getTable();
        }

        @Override
        public String getLogicalName() {
          // logical name for the primary table is null
          return null;
        }
      };
    }
    else if ( XMLUnionSubclassElement.class.isInstance( entityElement() ) ) {
      return new TableSource() {
        @Override
        public String getExplicitSchemaName() {
          return ( (XMLUnionSubclassElement) entityElement() ).getSchema();
        }
View Full Code Here

Examples of org.hibernate.metamodel.source.binder.TableSource

    return new Caching( region, accessType, cacheLazyProps );
  }

  @Override
  public TableSource getPrimaryTable() {
    return new TableSource() {
      @Override
      public String getExplicitSchemaName() {
        return entityElement().getSchema();
      }
View Full Code Here

Examples of org.hibernate.metamodel.source.binder.TableSource

  }

  @Override
  public TableSource getPrimaryTable() {
    if ( JaxbJoinedSubclassElement.class.isInstance( entityElement() ) ) {
      return new TableSource() {
        @Override
        public String getExplicitSchemaName() {
          return ( (JaxbJoinedSubclassElement) entityElement() ).getSchema();
        }

        @Override
        public String getExplicitCatalogName() {
          return ( (JaxbJoinedSubclassElement) entityElement() ).getCatalog();
        }

        @Override
        public String getExplicitTableName() {
          return ( (JaxbJoinedSubclassElement) entityElement() ).getTable();
        }

        @Override
        public String getLogicalName() {
          // logical name for the primary table is null
          return null;
        }
      };
    }
    else if ( JaxbUnionSubclassElement.class.isInstance( entityElement() ) ) {
      return new TableSource() {
        @Override
        public String getExplicitSchemaName() {
          return ( (JaxbUnionSubclassElement) entityElement() ).getSchema();
        }
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.