private boolean shouldProject() { if (indexes.length == getColumns().size()) { for (int i = 0; i < indexes.length; i++) { if (indexes[i] != i) { return true; } } return false; } return true; }
private boolean shouldProject() { if (indexes.length == getColumns().size()) { for (int i = 0; i < indexes.length; i++) { if (indexes[i] != i) { return true; } } return false; } return true; }
private boolean shouldProject() { if (indexes.length == getColumns().size()) { for (int i = 0; i < indexes.length; i++) { if (indexes[i] != i) { return true; } } return false; } return true; }
void addIndex(List<ElementSymbol> indexColumns, boolean unique) throws TeiidComponentException, TeiidProcessingException { List<ElementSymbol> keyColumns = columns.subList(0, tree.getKeyLength()); if (keyColumns.equals(indexColumns) || (indexTables != null && indexTables.containsKey(indexColumns))) { return; } TempTable indexTable = createIndexTable(indexColumns, unique); //TODO: ordered insert optimization TupleSource ts = createTupleSource(indexTable.getColumns(), null, null); indexTable.insert(ts, indexTable.getColumns(), false, false, null); indexTable.getTree().compact(); }
void addIndex(List<ElementSymbol> indexColumns, boolean unique) throws TeiidComponentException, TeiidProcessingException { List<ElementSymbol> keyColumns = columns.subList(0, tree.getKeyLength()); if (keyColumns.equals(indexColumns) || (indexTables != null && indexTables.containsKey(indexColumns))) { return; } TempTable indexTable = createIndexTable(indexColumns, unique); //TODO: ordered insert optimization TupleSource ts = createTupleSource(indexTable.getColumns(), null, null); indexTable.insert(ts, indexTable.getColumns(), false, false, null); indexTable.getTree().compact(); }
void addIndex(List<ElementSymbol> indexColumns, boolean unique) throws TeiidComponentException, TeiidProcessingException { List<ElementSymbol> keyColumns = columns.subList(0, tree.getKeyLength()); if (keyColumns.equals(indexColumns) || (indexTables != null && indexTables.containsKey(indexColumns))) { return; } TempTable indexTable = createIndexTable(indexColumns, unique); //TODO: ordered insert optimization TupleSource ts = createTupleSource(indexTable.getColumns(), null, null); indexTable.insert(ts, indexTable.getColumns(), false, false, null); indexTable.getTree().compact(); }
/** * Ensure the temp table is ready for use. If a temp table other than the one * passed in is returned it should be used instead. * @param tempTable * @param context * @param bufferManager * @param dataMgr * @throws TeiidComponentException * @throws TeiidProcessingException */ public TempTable process(TempTable tempTable) throws TeiidComponentException, TeiidProcessingException { if (!tempTable.getColumnMap().keySet().containsAll(columns)) { //sanity check to make sure that we haven't inappropriately redefined the common table throw new TeiidComponentException("failed to plan common table appropriately " + columns + " " + tempTable.getColumns()); //$NON-NLS-1$ //$NON-NLS-2$ } tempTable.insert(iterator, columns, false, false, null); tempTable.setUpdatable(false); close(); return tempTable; }
/** * Ensure the temp table is ready for use. If a temp table other than the one * passed in is returned it should be used instead. * @param tempTable * @param context * @param bufferManager * @param dataMgr * @throws TeiidComponentException * @throws TeiidProcessingException */ public TempTable process(TempTable tempTable) throws TeiidComponentException, TeiidProcessingException { if (!tempTable.getColumnMap().keySet().containsAll(columns)) { //sanity check to make sure that we haven't inappropriately redefined the common table throw new TeiidComponentException("failed to plan common table appropriately " + columns + " " + tempTable.getColumns()); //$NON-NLS-1$ //$NON-NLS-2$ } tempTable.insert(iterator, columns, false, false, null); tempTable.setUpdatable(false); tempTable.setAllowImplicitIndexing(true); close(); return tempTable; }
/** * Ensure the temp table is ready for use. If a temp table other than the one * passed in is returned it should be used instead. * @param tempTable * @param context * @param bufferManager * @param dataMgr * @throws TeiidComponentException * @throws TeiidProcessingException */ public TempTable process(TempTable tempTable) throws TeiidComponentException, TeiidProcessingException { if (!tempTable.getColumnMap().keySet().containsAll(columns)) { //sanity check to make sure that we haven't inappropriately redefined the common table throw new TeiidComponentException("failed to plan common table appropriately " + columns + " " + tempTable.getColumns()); //$NON-NLS-1$ //$NON-NLS-2$ } tempTable.insert(iterator, columns, false, false, null); tempTable.setUpdatable(false); tempTable.setAllowImplicitIndexing(true); close(); return tempTable; }
public TupleSource insert(TupleSource tuples, final List<ElementSymbol> variables, boolean canUndo, boolean upsert, CommandContext context) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { List<ElementSymbol> cols = getColumns(); final int[] indexes = new int[cols.size()]; boolean shouldProject = false;
public TupleSource insert(TupleSource tuples, final List<ElementSymbol> variables, boolean canUndo, boolean upsert, CommandContext context) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { List<ElementSymbol> cols = getColumns(); final int[] indexes = new int[cols.size()]; boolean shouldProject = false;
public TupleSource insert(TupleSource tuples, final List<ElementSymbol> variables, boolean canUndo, boolean upsert, CommandContext context) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { List<ElementSymbol> cols = getColumns(); final int[] indexes = new int[cols.size()]; boolean shouldProject = false;
throws TeiidComponentException, TeiidProcessingException { TupleBrowser browser = ii.createTupleBrowser(bm.getOptions().getDefaultNullOrder(), true); TupleSource ts = new QueryTupleSource(browser, columnMap, agg?getColumns():projectedCols, condition);
throws TeiidComponentException, TeiidProcessingException { TupleBrowser browser = ii.createTupleBrowser(bm.getOptions().getDefaultNullOrder(), true); TupleSource ts = new QueryTupleSource(browser, columnMap, agg?getColumns():projectedCols, condition);
throws TeiidComponentException, TeiidProcessingException { TupleBrowser browser = ii.createTupleBrowser(bm.getOptions().getDefaultNullOrder(), true); TupleSource ts = new QueryTupleSource(browser, columnMap, agg?getColumns():projectedCols, condition);