throw new TeiidComponentException(QueryPlugin.Event.TEIID31176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31176, this.requestMsg.getCommand().getProjectedSymbols().get(i), DataTypeManager.getDataTypeName(this.schema[i]))); } catch (TransformationException e) { throw new TeiidException(QueryPlugin.Event.TEIID31176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31176, this.requestMsg.getCommand().getProjectedSymbols().get(i), DataTypeManager.getDataTypeName(this.schema[i])));
@Override public ConnectorWork registerRequest(AtomicRequestMessage message) throws TeiidComponentException { List projectedSymbols = (message.getCommand()).getProjectedSymbols(); List[] results = createResults(projectedSymbols, rows, useIntCounter); if (RelationalNodeUtil.isUpdate(message.getCommand())) { results = new List[] {Arrays.asList(1)};
throw new TeiidComponentException(QueryPlugin.Event.TEIID31176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31176, this.requestMsg.getCommand().getProjectedSymbols().get(i), DataTypeManager.getDataTypeName(this.schema[i]))); } catch (TransformationException e) { throw new TeiidException(QueryPlugin.Event.TEIID31176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31176, this.requestMsg.getCommand().getProjectedSymbols().get(i), DataTypeManager.getDataTypeName(this.schema[i])));
@Test public void testCheckForUpdatesWithBatched() throws Exception { helpSetupDataTierManager(); QueryMetadataInterface metadata = RealMetadataFactory.exampleBQTCached(); AtomicRequestMessage request = helpSetupRequest("delete from bqt1.smalla", 1, metadata); Command command = helpGetCommand("insert into bqt1.smalla (stringkey) values ('1')", metadata); BatchedUpdateCommand bac = new BatchedUpdateCommand(Arrays.asList(request.getCommand(), command)); request.setCommand(bac); DataTierTupleSource dtts = new DataTierTupleSource(request, workItem, connectorManager.registerRequest(request), dtm, limit); pullTuples(dtts, 2); }
throw new TeiidComponentException(QueryPlugin.Event.TEIID31176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31176, this.requestMsg.getCommand().getProjectedSymbols().get(i), DataTypeManager.getDataTypeName(this.schema[i]))); } catch (TransformationException e) { throw new TeiidException(QueryPlugin.Event.TEIID31176, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31176, this.requestMsg.getCommand().getProjectedSymbols().get(i), DataTypeManager.getDataTypeName(this.schema[i])));
Command cmd = qr.getCommand(); sqlStr = cmd != null ? cmd.toString() : null;
return; //already closed LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Processing Close :", this.requestMsg.getCommand()}); //$NON-NLS-1$ try { timer.start();
Command command = aqr.getCommand(); int commandIndex = 0; if (RelationalNodeUtil.isUpdate(command)) {
Integer.toString(requestID.getExecutionId()), this); SourceHint hint = message.getCommand().getSourceHint(); if (hint != null) { this.securityContext.setGeneralHints(hint.getGeneralHints()); translatedCommand = factory.translate(message.getCommand()); List<Expression> symbols = this.requestMsg.getCommand().getProjectedSymbols(); this.schema = new Class[symbols.size()]; this.convertToDesiredRuntimeType = new boolean[symbols.size()];
Command cmd = qr.getCommand(); sqlStr = cmd != null ? cmd.toString() : null;
Integer.toString(requestID.getExecutionId()), this); SourceHint hint = message.getCommand().getSourceHint(); if (hint != null) { this.securityContext.setGeneralHints(hint.getGeneralHints()); translatedCommand = factory.translate(message.getCommand()); List<Expression> symbols = this.requestMsg.getCommand().getProjectedSymbols(); this.schema = new Class[symbols.size()]; this.convertToDesiredRuntimeType = new boolean[symbols.size()];
info.setCommand(arm.getCommand().toString()); info.setStartTime(arm.getProcessingTimestamp()); info.setSourceRequest(true);
return; //already closed LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Processing Close :", this.requestMsg.getCommand()}); //$NON-NLS-1$ Scope scope = null; try {
info.setCommand(arm.getCommand().toString()); info.setStartTime(arm.getProcessingTimestamp()); info.setSourceRequest(true);
return; //already closed LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Processing Close :", this.requestMsg.getCommand()}); //$NON-NLS-1$ Scope scope = null; try {
info.setCommand(arm.getCommand().toString()); info.setStartTime(arm.getProcessingTimestamp()); info.setSourceRequest(true);
if (this.execution == null) { if (this.connection == null) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.requestMsg.getAtomicRequestID(), "Processing NEW request:", this.requestMsg.getCommand()}); //$NON-NLS-1$ try { this.connectionFactory = this.manager.getConnectionFactory(); Command command = this.requestMsg.getCommand(); this.expectedColumns = command.getProjectedSymbols().size(); if (command instanceof StoredProcedure) {
this.connectorManager.cacheDirective = cd; helpSetupDataTierManager(); Command command = helpSetupRequest("SELECT stringkey from bqt1.smalla", 1, metadata).getCommand(); RegisterRequestParameter rrp = new RegisterRequestParameter(); rrp.connectorBindingId = "x"; command = helpSetupRequest("SELECT stringkey from bqt1.smalla", 1, metadata).getCommand(); rrp = new RegisterRequestParameter(); rrp.connectorBindingId = "x"; command = helpSetupRequest("SELECT stringkey from bqt1.smalla", 1, metadata).getCommand(); this.context.getSession().setSessionId("different"); rrp = new RegisterRequestParameter(); command = helpSetupRequest("SELECT stringkey from bqt1.smalla", 1, metadata).getCommand(); cd.setInvalidation(Invalidation.IMMEDIATE); rrp = new RegisterRequestParameter();
if (this.execution == null) { if (this.connection == null) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.requestMsg.getAtomicRequestID(), "Processing NEW request:", this.requestMsg.getCommand()}); //$NON-NLS-1$ try { this.connectionFactory = this.manager.getConnectionFactory(); Command command = this.requestMsg.getCommand(); this.expectedColumns = command.getProjectedSymbols().size(); if (command instanceof StoredProcedure) {
@Test public void testCancelWithCaching() throws Exception { QueryMetadataInterface metadata = RealMetadataFactory.exampleBQTCached(); CacheDirective cd = new CacheDirective(); this.connectorManager.cacheDirective = cd; helpSetupDataTierManager(); Command command = helpSetupRequest("SELECT stringkey from bqt1.smalla", 1, metadata).getCommand(); this.context.getSession().setSessionId("different"); RegisterRequestParameter rrp = new RegisterRequestParameter(); rrp.connectorBindingId = "x"; TupleSource ts = dtm.registerRequest(context, command, "foo", rrp); assertTrue(ts instanceof CachingTupleSource); assertEquals(4, pullTuples(ts, 4)); ((CachingTupleSource)ts).item.requestCancel(""); assertEquals(1, connectorManager.getExecuteCount().get()); assertFalse(rrp.doNotCache); ts.closeSource(); //should force read all assertFalse(((CachingTupleSource)ts).dtts.errored); assertNull(((CachingTupleSource)ts).dtts.scope); assertEquals(0, this.rm.getRsCache().getCachePutCount()); }