Examples of Table


Examples of org.apache.hadoop.hive.ql.metadata.Table

      } else {
        String obj = hiveObjectDesc.getObject();
        boolean notFound = true;
        String dbName = null;
        String tableName = null;
        Table tableObj = null;
        Database dbObj = null;

        if (hiveObjectDesc.getTable()) {
          String[] dbTab = obj.split("\\.");
          if (dbTab.length == 2) {
View Full Code Here

Examples of org.apache.isis.viewer.html.component.Table

        IsisContext.getPersistenceSession().resolveField(object, collection);

        context.addCollectionFieldCrumb(collection.getName());
        content.add(context.getComponentFactory().createHeading(collection.getName()));
        final Table table = TableUtil.createTable(context, id, object, collection);
        content.add(table);
        if (collection.isUsable(IsisContext.getAuthenticationSession(), object, where).isAllowed()) {
            content.add(context.getComponentFactory().createAddOption(id, collection.getId()));
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.util.console.util.Table

        if (path == null) {
            // display mount information
            if (!ctx.getVaultFsApp().isMounted()) {
                VaultFsApp.log.info("Not mounted.");
            } else {
                Table t = new Table(2);
                t.addRow("      User:", ctx.getVaultFsApp().getProperty(VaultFsApp.KEY_USER));
                t.addRow(" Workspace:", ctx.getVaultFsApp().getProperty(VaultFsApp.KEY_WORKSPACE));
                t.addRow("Mountpoint:", ctx.getVaultFsApp().getProperty(VaultFsApp.KEY_MOUNTPOINT));
                t.print();
            }
        } else {
            if (!ctx.getVaultFsApp().isLoggedIn()) {
                VaultFsApp.log.info("Not logged in.");
            } else {
View Full Code Here

Examples of org.apache.jmeter.testelement.Table

        ReportMenuFactory.addEditMenu(pop,true);
        return pop;
    }

    public TestElement createTestElement() {
        Table element = new Table();
        modifyTestElement(element);
        return element;
    }
View Full Code Here

Examples of org.apache.metamodel.schema.Table

    assertNotNull(fooColumn);

    dc = Converters.addTypeConverter(dc, fooColumn,
        new StringToIntegerConverter());

    Table table = dc.getDefaultSchema().getTableByName("table");
    Query query = dc.query().from(table).select(table.getColumns())
        .toQuery();
    assertEquals("SELECT table.foo, table.bar FROM schema.table",
        query.toSql());

    DataSet ds = dc.executeQuery(query);
View Full Code Here

Examples of org.apache.openejb.jee.jpa.Table

            if (entityData == null) {
                // todo warn no such ejb in the ejb-jar.xml
                continue;
            }

            Table table = new Table();
            table.setName(bean.getTableName());
            entityData.entity.setTable(table);

            for (EntityBeanType.CmpFieldMapping cmpFieldMapping : bean.getCmpFieldMapping()) {
                String cmpFieldName = cmpFieldMapping.getCmpFieldName();
                Field field = entityData.fields.get(cmpFieldName);
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.Table

        info.assertNoForeignKey(cls, !adapt);
        info.assertNoIndex(cls, false);
        info.assertNoUnique(cls, false);

        // find class table
        Table table = info.getTable(cls, adapt);

        // find primary key column
        Column[] pkCols = null;
        if (cls.getIdentityType() == cls.ID_DATASTORE) {
            Column id = new Column();
            id.setName("id");
            id.setJavaType(JavaTypes.LONG);
            if (cls.getIdentityStrategy() == ValueStrategies.AUTOASSIGN)
                id.setAutoAssigned(true);
            id.setNotNull(true);
            pkCols = info.getDataStoreIdColumns(cls, new Column[]{ id },
                table, adapt);
            cls.setPrimaryKeyColumns(pkCols);
            cls.setColumnIO(info.getColumnIO());
        }
        cls.setTable(table);

        // add a primary key if we don't have one already
        PrimaryKey pk = table.getPrimaryKey();
        if (pk == null) {
            String pkname = null;
            if (adapt)
                pkname = cls.getMappingRepository().getMappingDefaults().
                    getPrimaryKeyName(cls, table);
            pk = table.addPrimaryKey(pkname);
            pk.setLogical(!adapt);
            if (pkCols != null)
                pk.setColumns(pkCols);
        }
View Full Code Here

Examples of org.apache.phoenix.compile.JoinCompiler.Table

    @SuppressWarnings("unchecked")
    protected QueryPlan compileJoinQuery(StatementContext context, List<Object> binds, JoinTable joinTable, boolean asSubquery) throws SQLException {
        byte[] emptyByteArray = new byte[0];
        List<JoinSpec> joinSpecs = joinTable.getJoinSpecs();
        if (joinSpecs.isEmpty()) {
            Table table = joinTable.getTable();
            SelectStatement subquery = table.getAsSubquery();
            if (!table.isSubselect()) {
                ProjectedPTableWrapper projectedTable = table.createProjectedTable(!asSubquery);
                TupleProjector.serializeProjectorIntoScan(context.getScan(), projectedTable.createTupleProjector());
                context.setCurrentTable(table.getTableRef());
                context.setResolver(projectedTable.createColumnResolver());
                table.projectColumns(context.getScan());
                return compileSingleQuery(context, subquery, binds, asSubquery, true);
            }
            QueryPlan plan = compileSubquery(subquery);
            ProjectedPTableWrapper projectedTable = table.createProjectedTable(plan.getProjector());
            context.setResolver(projectedTable.createColumnResolver());
            context.setClientTupleProjector(projectedTable.createTupleProjector());
            return plan;
        }
       
        boolean[] starJoinVector = joinTable.getStarJoinVector();
        if (starJoinVector != null) {
            Table table = joinTable.getTable();
            ProjectedPTableWrapper initialProjectedTable;
            TableRef tableRef;
            SelectStatement query;
            if (!table.isSubselect()) {
                initialProjectedTable = table.createProjectedTable(!asSubquery);
                tableRef = table.getTableRef();
                table.projectColumns(context.getScan());
                query = joinTable.getAsSingleSubquery(table.getAsSubquery(), asSubquery);
            } else {
                SelectStatement subquery = table.getAsSubquery();
                QueryPlan plan = compileSubquery(subquery);
                initialProjectedTable = table.createProjectedTable(plan.getProjector());
                tableRef = plan.getTableRef();
                context.getScan().setFamilyMap(plan.getContext().getScan().getFamilyMap());
                query = joinTable.getAsSingleSubquery((SelectStatement) plan.getStatement(), asSubquery);
            }
            PTableWrapper projectedTable = initialProjectedTable;
            int count = joinSpecs.size();
            ImmutableBytesPtr[] joinIds = new ImmutableBytesPtr[count];
            List<Expression>[] joinExpressions = new List[count];
            List<Expression>[] hashExpressions = new List[count];
            JoinType[] joinTypes = new JoinType[count];
            PTable[] tables = new PTable[count];
            int[] fieldPositions = new int[count];
            QueryPlan[] joinPlans = new QueryPlan[count];
            TupleProjector[] clientProjectors = new TupleProjector[count];
            fieldPositions[0] = projectedTable.getTable().getColumns().size() - projectedTable.getTable().getPKColumns().size();
            boolean forceProjection = table.isSubselect();
            boolean needsProject = forceProjection || asSubquery;
            for (int i = 0; i < count; i++) {
                JoinSpec joinSpec = joinSpecs.get(i);
                Scan subScan = ScanUtil.newScan(originalScan);
                StatementContext subContext = new StatementContext(statement, context.getResolver(), subScan, new SequenceManager(statement));
                joinPlans[i] = compileJoinQuery(subContext, binds, joinSpec.getJoinTable(), true);
                ColumnResolver resolver = subContext.getResolver();
                clientProjectors[i] = subContext.getClientTupleProjector();
                boolean hasPostReference = joinSpec.getJoinTable().hasPostReference();
                if (hasPostReference) {
                    PTableWrapper subProjTable = ((JoinedTableColumnResolver) (resolver)).getPTableWrapper();
                    tables[i] = subProjTable.getTable();
                    projectedTable = projectedTable.mergeProjectedTables(subProjTable, joinSpec.getType() == JoinType.Inner);
                    needsProject = true;
                } else {
                    tables[i] = null;
                }
                if (!starJoinVector[i]) {
                    needsProject = true;
                }
                ColumnResolver leftResolver = (!forceProjection && starJoinVector[i]) ? joinTable.getOriginalResolver() : projectedTable.createColumnResolver();
                joinIds[i] = new ImmutableBytesPtr(emptyByteArray); // place-holder
                Pair<List<Expression>, List<Expression>> joinConditions = joinSpec.compileJoinConditions(context, leftResolver, resolver);
                joinExpressions[i] = joinConditions.getFirst();
                hashExpressions[i] = joinConditions.getSecond();
                joinTypes[i] = joinSpec.getType();
                if (i < count - 1) {
                    fieldPositions[i + 1] = fieldPositions[i] + (tables[i] == null ? 0 : (tables[i].getColumns().size() - tables[i].getPKColumns().size()));
                }
            }
            if (needsProject) {
                TupleProjector.serializeProjectorIntoScan(context.getScan(), initialProjectedTable.createTupleProjector());
            }
            context.setCurrentTable(tableRef);
            context.setResolver(needsProject ? projectedTable.createColumnResolver() : joinTable.getOriginalResolver());
            BasicQueryPlan plan = compileSingleQuery(context, query, binds, asSubquery, joinTable.isAllLeftJoin());
            Expression postJoinFilterExpression = joinTable.compilePostFilterExpression(context);
            Integer limit = null;
            if (query.getLimit() != null && !query.isAggregate() && !query.isDistinct() && query.getOrderBy().isEmpty()) {
                limit = LimitCompiler.compile(context, query);
            }
            HashJoinInfo joinInfo = new HashJoinInfo(projectedTable.getTable(), joinIds, joinExpressions, joinTypes, starJoinVector, tables, fieldPositions, postJoinFilterExpression, limit, forceProjection);
            return new HashJoinPlan(joinTable.getStatement(), plan, joinInfo, hashExpressions, joinPlans, clientProjectors);
        }
       
        JoinSpec lastJoinSpec = joinSpecs.get(joinSpecs.size() - 1);
        JoinType type = lastJoinSpec.getType();
        if (type == JoinType.Full)
            throw new SQLFeatureNotSupportedException("Full joins not supported.");
       
        if (type == JoinType.Right || type == JoinType.Inner) {
            if (!lastJoinSpec.getJoinTable().getJoinSpecs().isEmpty())
                throw new SQLFeatureNotSupportedException("Right join followed by sub-join is not supported.");
           
            JoinTable rhsJoinTable = lastJoinSpec.getJoinTable();
            Table rhsTable = rhsJoinTable.getTable();
            JoinTable lhsJoin = joinTable.getSubJoinTableWithoutPostFilters();
            Scan subScan = ScanUtil.newScan(originalScan);
            StatementContext lhsCtx = new StatementContext(statement, context.getResolver(), subScan, new SequenceManager(statement));
            QueryPlan lhsPlan = compileJoinQuery(lhsCtx, binds, lhsJoin, true);
            ColumnResolver lhsResolver = lhsCtx.getResolver();
            TupleProjector clientProjector = lhsCtx.getClientTupleProjector();
            PTableWrapper lhsProjTable = ((JoinedTableColumnResolver) (lhsResolver)).getPTableWrapper();
            ProjectedPTableWrapper rhsProjTable;
            TableRef rhsTableRef;
            SelectStatement rhs;
            if (!rhsTable.isSubselect()) {
                rhsProjTable = rhsTable.createProjectedTable(!asSubquery);
                rhsTableRef = rhsTable.getTableRef();
                rhsTable.projectColumns(context.getScan());
                rhs = rhsJoinTable.getAsSingleSubquery(rhsTable.getAsSubquery(), asSubquery);
            } else {
                SelectStatement subquery = rhsTable.getAsSubquery();
                QueryPlan plan = compileSubquery(subquery);
                rhsProjTable = rhsTable.createProjectedTable(plan.getProjector());
                rhsTableRef = plan.getTableRef();
                context.getScan().setFamilyMap(plan.getContext().getScan().getFamilyMap());
                rhs = rhsJoinTable.getAsSingleSubquery((SelectStatement) plan.getStatement(), asSubquery);
            }
            boolean forceProjection = rhsTable.isSubselect();
            ColumnResolver rhsResolver = forceProjection ? rhsProjTable.createColumnResolver() : joinTable.getOriginalResolver();
            ImmutableBytesPtr[] joinIds = new ImmutableBytesPtr[] {new ImmutableBytesPtr(emptyByteArray)};
            Pair<List<Expression>, List<Expression>> joinConditions = lastJoinSpec.compileJoinConditions(context, lhsResolver, rhsResolver);
            List<Expression> joinExpressions = joinConditions.getSecond();
            List<Expression> hashExpressions = joinConditions.getFirst();
View Full Code Here

Examples of org.apache.poi.hslf.model.Table

   
    final Shape[] shapes = s.getShapes();
    assertNotNull(shapes);
    assertEquals(3, shapes.length);
    assertTrue(shapes[2] instanceof Table);
    final Table table = (Table) shapes[2];
    assertEquals(4, table.getNumberOfColumns());
    assertEquals(6, table.getNumberOfRows());
    for (int x = 0; x < 4; x ++) {
      assertEquals("TH Cell " + (x + 1), table.getCell(0, x).getTextRun().getRawText());
      for (int y = 1; y < 6; y++) {
        assertEquals("Row " + y + ", Cell " + (x + 1), table.getCell(y, x).getText());
      }
    }
  }
View Full Code Here

Examples of org.apache.poi.hwpf.usermodel.Table

          FieldsDocumentPart docPart, PicturesSource pictures, PicturesTable pictureTable,
          XHTMLContentHandler xhtml) throws SAXException, IOException, TikaException {
       // Note - a poi bug means we can't currently properly recurse
       //  into nested tables, so currently we don't
       if(p.isInTable() && p.getTableLevel() > parentTableLevel && parentTableLevel==0) {
          Table t = r.getTable(p);
          xhtml.startElement("table");
          xhtml.startElement("tbody");
          for(int rn=0; rn<t.numRows(); rn++) {
             TableRow row = t.getRow(rn);
             xhtml.startElement("tr");
             for(int cn=0; cn<row.numCells(); cn++) {
                TableCell cell = row.getCell(cn);
                xhtml.startElement("td");

                for(int pn=0; pn<cell.numParagraphs(); pn++) {
                   Paragraph cellP = cell.getParagraph(pn);
                   handleParagraph(cellP, p.getTableLevel(), cell, document, docPart, pictures, pictureTable, xhtml);
                }
                xhtml.endElement("td");
             }
             xhtml.endElement("tr");
          }
          xhtml.endElement("tbody");
          xhtml.endElement("table");
          return (t.numParagraphs()-1);
       }

       TagAndStyle tas;

       if (document.getStyleSheet().numStyles()>p.getStyleIndex()) {
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.