void setUpdatable(boolean updatable) { this.updatable = updatable; if (this.indexTables != null) { for (TempTable index : this.indexTables.values()) { index.setUpdatable(updatable); } } }
void setUpdatable(boolean updatable) { this.updatable = updatable; if (this.indexTables != null) { for (TempTable index : this.indexTables.values()) { index.setUpdatable(updatable); } } }
public void setUpdatable(String name, boolean updatable) { TempTable table = tempTables.get(name); if (table != null) { table.setUpdatable(updatable); } }
public void setUpdatable(String name, boolean updatable) { TempTable table = tempTables.get(name); if (table != null) { table.setUpdatable(updatable); } }
void setUpdatable(boolean updatable) { this.updatable = updatable; if (this.indexTables != null) { for (TempTable index : this.indexTables.values()) { index.setUpdatable(updatable); } } }
public void setUpdatable(String name, boolean updatable) { TempTable table = tempTables.get(name); if (table != null) { table.setUpdatable(updatable); } }
private TempTable createIndexTable(List<ElementSymbol> indexColumns, boolean unique) { List<ElementSymbol> allColumns = new ArrayList<ElementSymbol>(indexColumns); for (ElementSymbol elementSymbol : columns.subList(0, tree.getKeyLength())) { if (allColumns.indexOf(elementSymbol) < 0) { allColumns.add(elementSymbol); } } TempTable indexTable = new TempTable(new TempMetadataID("idx", Collections.EMPTY_LIST), this.bm, allColumns, allColumns.size(), this.sessionID); //$NON-NLS-1$ indexTable.setPreferMemory(this.tree.isPreferMemory()); indexTable.lock = this.lock; if (unique) { indexTable.uniqueColIndex = indexColumns.size(); } if (indexTables == null) { indexTables = new LinkedHashMap<List<ElementSymbol>, TempTable>(); indexTables.put(indexColumns, indexTable); } indexTable.setUpdatable(this.updatable); return indexTable; }
private TempTable createIndexTable(List<ElementSymbol> indexColumns, boolean unique) { List<ElementSymbol> allColumns = new ArrayList<ElementSymbol>(indexColumns); for (ElementSymbol elementSymbol : columns.subList(0, tree.getKeyLength())) { if (allColumns.indexOf(elementSymbol) < 0) { allColumns.add(elementSymbol); } } TempTable indexTable = new TempTable(new TempMetadataID("idx", Collections.EMPTY_LIST), this.bm, allColumns, allColumns.size(), this.sessionID); //$NON-NLS-1$ indexTable.setPreferMemory(this.tree.isPreferMemory()); indexTable.lock = this.lock; if (unique) { indexTable.uniqueColIndex = indexColumns.size(); } if (indexTables == null) { indexTables = new LinkedHashMap<List<ElementSymbol>, TempTable>(); indexTables.put(indexColumns, indexTable); } indexTable.setUpdatable(this.updatable); return indexTable; }
private TempTable createIndexTable(List<ElementSymbol> indexColumns, boolean unique) { List<ElementSymbol> allColumns = new ArrayList<ElementSymbol>(indexColumns); for (ElementSymbol elementSymbol : columns.subList(0, tree.getKeyLength())) { if (allColumns.indexOf(elementSymbol) < 0) { allColumns.add(elementSymbol); } } TempTable indexTable = new TempTable(new TempMetadataID("idx", Collections.EMPTY_LIST), this.bm, allColumns, allColumns.size(), this.sessionID); //$NON-NLS-1$ indexTable.setPreferMemory(this.tree.isPreferMemory()); indexTable.lock = this.lock; if (unique) { indexTable.uniqueColIndex = indexColumns.size(); } if (indexTables == null) { indexTables = new LinkedHashMap<List<ElementSymbol>, TempTable>(); indexTables.put(indexColumns, indexTable); } indexTable.setUpdatable(this.updatable); return indexTable; }
/** * 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; }
@Override public TempTable createMatTable(final String tableName, GroupSymbol group) throws TeiidComponentException, QueryMetadataException, TeiidProcessingException { Create create = getCreateCommand(group, true, metadata); TempTable table = tableStore.addTempTable(tableName, create, bufferManager, false, null); table.setUpdatable(false); CacheHint hint = table.getCacheHint(); if (hint != null) { table.setPreferMemory(hint.isPrefersMemory()); if (hint.getTtl() != null) { getMatTableInfo(tableName).setTtl(hint.getTtl()); } if (!create.getPrimaryKey().isEmpty()) { table.setUpdatable(hint.isUpdatable(false)); } } return table; }
@Override public TempTable createMatTable(final String tableName, GroupSymbol group) throws TeiidComponentException, QueryMetadataException, TeiidProcessingException { Create create = getCreateCommand(group, true, metadata); TempTable table = tableStore.addTempTable(tableName, create, bufferManager, false, null); table.setUpdatable(false); CacheHint hint = table.getCacheHint(); if (hint != null) { table.setPreferMemory(hint.isPrefersMemory()); if (hint.getTtl() != null) { getMatTableInfo(tableName).setTtl(hint.getTtl()); } if (!create.getPrimaryKey().isEmpty()) { table.setUpdatable(hint.isUpdatable(false)); } } return table; }
@Override public TempTable createMatTable(final String tableName, GroupSymbol group) throws TeiidComponentException, QueryMetadataException, TeiidProcessingException { Create create = getCreateCommand(group, true, metadata); TempTable table = tableStore.addTempTable(tableName, create, bufferManager, false, null); table.setUpdatable(false); CacheHint hint = table.getCacheHint(); if (hint != null) { table.setPreferMemory(hint.isPrefersMemory()); if (hint.getTtl() != null) { getMatTableInfo(tableName).setTtl(hint.getTtl()); } if (!create.getPrimaryKey().isEmpty()) { table.setUpdatable(hint.isUpdatable(false)); } } return table; }
table.setUpdatable(hint.isUpdatable(false));
table.setUpdatable(hint.isUpdatable(false));
tempTable.setUpdatable(false); tempTable.setAllowImplicitIndexing(true); return tempTable;
tempTable.setUpdatable(false); return tempTable;
table.setUpdatable(hint.isUpdatable(false));