private void processPlan(TempTable tempTable, TempTable target) throws TeiidComponentException, TeiidProcessingException { List<Object> row = null; List tuple = null; while ((tuple = this.iterator.nextTuple()) != null) { if (all) { row = new ArrayList<Object>(tuple); row.add(0, tempTable.getRowCount()); } else{ row = tuple; } if (tempTable.insertTuple(row, false, false)) { target.insertTuple(row, false, true); } } iterator.closeSource(); }
private void processPlan(TempTable tempTable, TempTable target) throws TeiidComponentException, TeiidProcessingException { List<Object> row = null; List tuple = null; while ((tuple = this.iterator.nextTuple()) != null) { if (all) { row = new ArrayList<Object>(tuple); row.add(0, tempTable.getRowCount()); } else{ row = tuple; } if (tempTable.insertTuple(row, false, false)) { target.insertTuple(row, false, true); } } iterator.closeSource(); }
private void processPlan(TempTable tempTable, TempTable target) throws TeiidComponentException, TeiidProcessingException { List<Object> row = null; List tuple = null; while ((tuple = this.iterator.nextTuple()) != null) { if (all) { row = new ArrayList<Object>(tuple); row.add(0, tempTable.getRowCount()); } else{ row = tuple; } if (tempTable.insertTuple(row, false, false)) { target.insertTuple(row, false, true); } } iterator.closeSource(); }
long count = this.getRowCount(); return new CollectionTupleSource(Arrays.asList(Collections.nCopies(projectedCols.size(), (int)Math.min(Integer.MAX_VALUE, count))).iterator()); if ((indexTables != null || (!this.updatable && allowImplicitIndexing && condition != null && this.getRowCount() > 2*this.getTree().getPageSize(true))) && (condition != null || orderBy != null) && ii.valueSet.size() != 1) { LogManager.logDetail(LogConstants.CTX_DQP, "Considering indexes on table", this, "for query", projectedCols, condition, orderBy); //$NON-NLS-1$ //$NON-NLS-2$ long rowCost = this.tree.getRowCount();
long count = this.getRowCount(); return new CollectionTupleSource(Arrays.asList(Collections.nCopies(projectedCols.size(), (int)Math.min(Integer.MAX_VALUE, count))).iterator()); if ((indexTables != null || (!this.updatable && allowImplicitIndexing && condition != null && this.getRowCount() > 2*this.getTree().getPageSize(true))) && (condition != null || orderBy != null) && ii.valueSet.size() != 1) { LogManager.logDetail(LogConstants.CTX_DQP, "Considering indexes on table", this, "for query", projectedCols, condition, orderBy); //$NON-NLS-1$ //$NON-NLS-2$ long rowCost = this.tree.getRowCount();
long count = this.getRowCount(); return new CollectionTupleSource(Arrays.asList(Collections.nCopies(projectedCols.size(), (int)Math.min(Integer.MAX_VALUE, count))).iterator());
@Override protected TupleSource createTupleSource() throws TeiidComponentException, TeiidProcessingException { TempTableStore tts = contextStore; TempTable tt = tts.getOrCreateTempTable(tableName, query, bufferManager, true, false, context, group); if (context.getDataObjects() != null) { Object id = RelationalPlanner.getTrackableGroup(group, context.getMetadata()); if (id != null) { context.accessedDataObject(id); } } if (context.isParallel() && query.getCriteria() == null && query.getOrderBy() != null && tt.getRowCount() > MIN_ASYNCH_SIZE) { return new AsyncTupleSource(new Callable<TupleSource>() { @Override public TupleSource call() throws Exception { synchronized (this) { return tt.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy()); } } }, context); } return tt.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy()); } };
@Override protected TupleSource createTupleSource() throws TeiidComponentException, TeiidProcessingException { TempTableStore tts = contextStore; TempTable tt = tts.getOrCreateTempTable(tableName, query, bufferManager, true, false, context, group); if (context.getDataObjects() != null) { Object id = RelationalPlanner.getTrackableGroup(group, context.getMetadata()); if (id != null) { context.accessedDataObject(id); } } if (context.isParallel() && query.getCriteria() == null && query.getOrderBy() != null && tt.getRowCount() > MIN_ASYNCH_SIZE) { return new AsyncTupleSource(new Callable<TupleSource>() { @Override public TupleSource call() throws Exception { synchronized (this) { return tt.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy()); } } }, context); } return tt.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy()); } };
Assertion.isNotNull(tt, "Table doesn't exist"); //$NON-NLS-1$ tt.setUpdatable(false); if (att.getIndexColumns() != null && tt.getRowCount() > 2*tt.getTree().getPageSize(true)) { for (List<ElementSymbol> cols : att.getIndexColumns()) { tt.addIndex(cols, false);
while (working.getRowCount() > 0) { if (building) { return working;
while (working.getRowCount() > 0) { if (building) { return working;
while (working.getRowCount() > 0) { if (building) { return working;
rowCount = table.getRowCount(); Determinism determinism = qp.getContext().getDeterminismLevel(); context.setDeterminismLevel(determinism);
rowCount = table.getRowCount(); Determinism determinism = qp.getContext().getDeterminismLevel(); context.setDeterminismLevel(determinism);
rowCount = table.getRowCount(); Determinism determinism = qp.getContext().getDeterminismLevel(); context.setDeterminismLevel(determinism);
if (context.isParallel() && query.getCriteria() == null && query.getOrderBy() != null && table.getRowCount() > MIN_ASYNCH_SIZE) { return new AsyncTupleSource(new Callable<TupleSource>() { @Override
if (context.isParallel() && query.getCriteria() == null && query.getOrderBy() != null && table.getRowCount() > MIN_ASYNCH_SIZE) { return new AsyncTupleSource(new Callable<TupleSource>() { @Override