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; }
return table.insert(ts, insert.getVariables(), true, insert.isUpsert(), context);
return table.insert(ts, insert.getVariables(), true, insert.isUpsert(), context);
return table.insert(ts, insert.getVariables(), true, insert.isUpsert(), context);
insertTupleSource = new BatchCollector.BatchProducerTupleSource(qp); table.insert(insertTupleSource, allColumns, false, false, null); table.getTree().compact(); rowCount = table.getRowCount();
insertTupleSource = new BatchCollector.BatchProducerTupleSource(qp); table.insert(insertTupleSource, allColumns, false, false, null); table.getTree().compact(); rowCount = table.getRowCount();
insertTupleSource = new BatchCollector.BatchProducerTupleSource(qp); table.insert(insertTupleSource, allColumns, false, false, null); table.getTree().compact(); rowCount = table.getRowCount();