Author: shawkins
Date: 2011-08-18 21:07:56 -0400 (Thu, 18 Aug 2011)
New Revision: 3398
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
branches/7.4.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
Log:
TEIID-1722 fix for lookup function npe
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-08-18
20:41:00 UTC (rev 3397)
+++
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-08-19
01:07:56 UTC (rev 3398)
@@ -750,7 +750,9 @@
}
Set<CacheID> keys = this.matTables.replicatableKeys();
for (final CacheID key:keys) {
- refreshMatView(contextProvider, key.getVDBKey().getName(),
key.getVDBKey().getVersion(), key.getSql());
+ if (key.getSql().startsWith(RelationalPlanner.MAT_PREFIX)) {
+ refreshMatView(contextProvider, key.getVDBKey().getName(),
key.getVDBKey().getVersion(),
key.getSql().substring(RelationalPlanner.MAT_PREFIX.length()));
+ }
}
}
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-08-18
20:41:00 UTC (rev 3397)
+++
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2011-08-19
01:07:56 UTC (rev 3398)
@@ -38,6 +38,7 @@
import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.Assertion;
import org.teiid.core.util.EquivalenceUtil;
import org.teiid.core.util.HashCodeUtil;
import org.teiid.logging.LogConstants;
@@ -238,6 +239,7 @@
}
public CacheID(ParseInfo pi, String sql, String vdbName, int vdbVersion, String
sessionId, String userName){
+ Assertion.isNotNull(sql);
this.sql = sql;
this.vdbInfo = new VDBKey(vdbName, vdbVersion);
this.pi = pi;
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-08-18
20:41:00 UTC (rev 3397)
+++
branches/7.4.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-08-19
01:07:56 UTC (rev 3398)
@@ -559,7 +559,7 @@
TupleSource ts = null;
CacheID cid = null;
if (distributedCache != null) {
- cid = new CacheID(new ParseInfo(), viewName, context.getVdbName(),
+ cid = new CacheID(new ParseInfo(), fullName, context.getVdbName(),
context.getVdbVersion(), context.getConnectionID(), context.getUserName());
if (useCache) {
CachedResults cr = this.distributedCache.get(cid);
Show replies by date