public void removeTempTableByName(final String tempTableName, CommandContext context) throws TeiidProcessingException { TempTableSynchronization synch = getSynchronization(context); tempMetadataStore.removeTempGroup(tempTableName); final TempTable table = this.tempTables.remove(tempTableName); if (table == null) { foreignTempTables.remove(tempTableName); return; } if (transactionMode != TransactionMode.ISOLATE_WRITES || synch == null || !synch.existingTables.contains(table.getId())) { table.remove(); } }
public void removeTempTableByName(final String tempTableName, CommandContext context) throws TeiidProcessingException { TempTableSynchronization synch = getSynchronization(context); tempMetadataStore.removeTempGroup(tempTableName); final TempTable table = this.tempTables.remove(tempTableName); if (table == null) { foreignTempTables.remove(tempTableName); return; } if (transactionMode != TransactionMode.ISOLATE_WRITES || synch == null || !synch.existingTables.contains(table.getId())) { table.remove(); } }
public void removeTempTableByName(final String tempTableName, CommandContext context) throws TeiidProcessingException { TempTableSynchronization synch = getSynchronization(context); tempMetadataStore.removeTempGroup(tempTableName); final TempTable table = this.tempTables.remove(tempTableName); if (table == null) { foreignTempTables.remove(tempTableName); return; } if (transactionMode != TransactionMode.ISOLATE_WRITES || synch == null || !synch.existingTables.contains(table.getId())) { table.remove(); } }
private void resolveSubQuery(SubqueryContainer<?> obj, Collection<GroupSymbol> externalGroups) { Command command = obj.getCommand(); QueryResolver.setChildMetadata(command, query); command.pushNewResolvingContext(externalGroups); for (GroupSymbol gs : externalGroups) { //subquery from clauses are not valid for resolving against //and they are not caught by later validation like scalar groups //we can directly remove as each command has a copy of the known temp groups if (!gs.isTempTable()) { command.getTemporaryMetadata().removeTempGroup(gs.getName()); } } try { QueryResolver.resolveCommand(command, metadata.getMetadata(), false); } catch (TeiidException err) { throw new TeiidRuntimeException(err); } }
private void resolveSubQuery(SubqueryContainer<?> obj, Collection<GroupSymbol> externalGroups) { Command command = obj.getCommand(); QueryResolver.setChildMetadata(command, query); command.pushNewResolvingContext(externalGroups); for (GroupSymbol gs : externalGroups) { //subquery from clauses are not valid for resolving against //and they are not caught by later validation like scalar groups //we can directly remove as each command has a copy of the known temp groups if (!gs.isTempTable()) { command.getTemporaryMetadata().removeTempGroup(gs.getName()); } } try { QueryResolver.resolveCommand(command, metadata.getMetadata(), false); } catch (TeiidException err) { throw new TeiidRuntimeException(err); } }