Author: shawkins
Date: 2011-08-04 11:31:44 -0400 (Thu, 04 Aug 2011)
New Revision: 3361
Modified:
branches/7.4.x/client/src/main/java/org/teiid/jdbc/StatementImpl.java
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
branches/7.4.x/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java
Log:
TEIID-1697 no longer associating the analysisrecord with cached results
Modified: branches/7.4.x/client/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- branches/7.4.x/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-08-04
15:04:00 UTC (rev 3360)
+++ branches/7.4.x/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2011-08-04
15:31:44 UTC (rev 3361)
@@ -1060,9 +1060,15 @@
}
protected void setAnalysisInfo(ResultsMessage resultsMsg) {
- this.debugLog = resultsMsg.getDebugLog();
- this.currentPlanDescription = resultsMsg.getPlanDescription();
- this.annotations = resultsMsg.getAnnotations();
+ if (resultsMsg.getDebugLog() != null) {
+ this.debugLog = resultsMsg.getDebugLog();
+ }
+ if (resultsMsg.getPlanDescription() != null) {
+ this.currentPlanDescription = resultsMsg.getPlanDescription();
+ }
+ if (resultsMsg.getAnnotations() != null) {
+ this.annotations = resultsMsg.getAnnotations();
+ }
this.driverConnection.setDebugLog(debugLog);
this.driverConnection.setCurrentPlanDescription(currentPlanDescription);
this.driverConnection.setAnnotations(annotations);
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2011-08-04
15:04:00 UTC (rev 3360)
+++
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2011-08-04
15:31:44 UTC (rev 3361)
@@ -41,7 +41,6 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.parser.ParseInfo;
import org.teiid.query.parser.QueryParser;
@@ -58,8 +57,6 @@
private transient Command command;
private transient TupleBuffer results;
- private AnalysisRecord analysisRecord;
-
private String[] types;
private CacheHint hint;
private int batchSize;
@@ -73,14 +70,6 @@
return this.uuid;
}
- public AnalysisRecord getAnalysisRecord() {
- return analysisRecord;
- }
-
- public void setAnalysisRecord(AnalysisRecord analysisRecord) {
- this.analysisRecord = analysisRecord;
- }
-
public TupleBuffer getResults() {
return results;
}
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-08-04
15:04:00 UTC (rev 3360)
+++
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2011-08-04
15:31:44 UTC (rev 3361)
@@ -456,7 +456,6 @@
CachedResults cr = rsCache.get(cacheId);
if (cr != null) {
this.resultsBuffer = cr.getResults();
- this.analysisRecord = cr.getAnalysisRecord();
request.initMetadata();
this.originalCommand = cr.getCommand(requestMsg.getCommandString(),
request.metadata, pi);
request.validateAccess(this.originalCommand);
@@ -530,7 +529,6 @@
Determinism determinismLevel = processor.getContext().getDeterminismLevel();
CachedResults cr = new CachedResults();
cr.setCommand(originalCommand);
- cr.setAnalysisRecord(analysisRecord);
cr.setResults(resultsBuffer, processor.getProcessorPlan());
if (originalCommand.getCacheHint() != null) {
LogManager.logDetail(LogConstants.CTX_DQP, requestID, "Using cache
hint", originalCommand.getCacheHint()); //$NON-NLS-1$
@@ -659,6 +657,7 @@
if (requestMsg.getShowPlan() == ShowPlan.DEBUG) {
response.setDebugLog(analysisRecord.getDebugLog());
}
+ this.analysisRecord = null;
}
}
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java 2011-08-04
15:04:00 UTC (rev 3360)
+++
branches/7.4.x/engine/src/main/java/org/teiid/query/analysis/AnalysisRecord.java 2011-08-04
15:31:44 UTC (rev 3361)
@@ -53,7 +53,7 @@
* <li>Debug trace information, if requested</LI>
* </ul>
*/
-public class AnalysisRecord implements Serializable {
+public class AnalysisRecord {
// Common
public static final String PROP_OUTPUT_COLS = "Output Columns";
//$NON-NLS-1$
Show replies by date