[teiid-commits] teiid SVN: r2433 - in trunk: engine/src/main/java/org/teiid/dqp/internal/process and 15 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Aug 10 07:01:41 EDT 2010


Author: shawkins
Date: 2010-08-10 07:01:40 -0400 (Tue, 10 Aug 2010)
New Revision: 2433

Added:
   trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
   trunk/test-integration/common/src/test/resources/matviews.vdb
Modified:
   trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
   trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
   trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
   trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
   trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
   trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
   trunk/engine/src/main/java/org/teiid/query/sql/LanguageObject.java
   trunk/engine/src/main/java/org/teiid/query/sql/lang/Command.java
   trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
   trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java
   trunk/engine/src/test/java/org/teiid/dqp/message/TestAtomicRequestMessage.java
   trunk/metadata/src/main/resources/System.vdb
   trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java
   trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCSchema.java
   trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected
   trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
   trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected
   trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected
   trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected
   trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected
   trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
   trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected
   trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
   trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected
   trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
   trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected
   trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
Log:
TEIID-168 adding pref_mem hint handling to rs caching, changing languageobjects to not be serializable (this is only currently needed for caching, but we can easily work around it).  adding initial system reporting table on mat views.  it is only really informational for default materialization.

Modified: trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -72,6 +72,7 @@
 	private ArrayList<List<?>> batchBuffer;
 	private boolean removed;
 	private boolean forwardOnly;
+	private boolean prefersMemory;
 
 	private LobManager lobManager;
 	private int[] lobIndexes;
@@ -164,7 +165,7 @@
         	writeBatch.setTerminationFlag(true);
         }
         writeBatch.setDataTypes(types);
-		BatchManager.ManagedBatch mbatch = manager.createManagedBatch(writeBatch, false);
+		BatchManager.ManagedBatch mbatch = manager.createManagedBatch(writeBatch, prefersMemory);
 		this.batches.put(writeBatch.getBeginRow(), mbatch);
         batchBuffer = null;
 	}
@@ -314,4 +315,12 @@
 		return forwardOnly;
 	}
 	
+	public void setPrefersMemory(boolean prefersMemory) {
+		this.prefersMemory = prefersMemory;
+	}
+	
+	public boolean isPrefersMemory() {
+		return prefersMemory;
+	}
+	
 }

Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -27,6 +27,8 @@
 import java.util.List;
 import java.util.UUID;
 
+import org.teiid.api.exception.query.QueryParserException;
+import org.teiid.api.exception.query.QueryResolverException;
 import org.teiid.cache.Cachable;
 import org.teiid.cache.Cache;
 import org.teiid.common.buffer.BufferManager;
@@ -34,22 +36,32 @@
 import org.teiid.common.buffer.TupleBuffer;
 import org.teiid.common.buffer.BufferManager.TupleSourceType;
 import org.teiid.core.TeiidComponentException;
+import org.teiid.core.types.DataTypeManager;
 import org.teiid.core.util.Assertion;
 import org.teiid.dqp.DQPPlugin;
+import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 import org.teiid.query.analysis.AnalysisRecord;
+import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.parser.ParseInfo;
+import org.teiid.query.parser.QueryParser;
+import org.teiid.query.resolver.QueryResolver;
+import org.teiid.query.sql.lang.CacheHint;
 import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.symbol.ElementSymbol;
 
 
 public class CachedResults implements Serializable, Cachable {
 	private static final long serialVersionUID = -5603182134635082207L;
 	
-	private Command command;
+	private transient Command command;
+	private transient TupleBuffer results;
+
 	private AnalysisRecord analysisRecord;
-	private transient TupleBuffer results;
-	
-	private List<?> schema;
+
+	private String[] types;
+	private CacheHint hint;
 	private int batchSize;
 	
 	protected ArrayList<UUID> cachedBatches = new ArrayList<UUID>();
@@ -68,15 +80,24 @@
 	
 	public void setResults(TupleBuffer results) {
 		this.results = results;
-		this.schema = results.getSchema();
 		this.batchSize = results.getBatchSize();
+		this.types = TupleBuffer.getTypeNames(results.getSchema());
 	}
 	
 	public void setCommand(Command command) {
 		this.command = command;
+		this.hint = command.getCacheHint();
 	}
 	
-	public Command getCommand() {
+	public CacheHint getHint() {
+		return hint;
+	}
+	
+	public synchronized Command getCommand(String sql, QueryMetadataInterface metadata, ParseInfo info) throws QueryParserException, QueryResolverException, TeiidComponentException {
+		if (command == null) {
+			command = QueryParser.getQueryParser().parseCommand(sql, info);
+		}
+		QueryResolver.resolveCommand(command, metadata);
 		return command;
 	}
 
@@ -102,9 +123,17 @@
 	public synchronized boolean restore(Cache cache, BufferManager bufferManager) {
 		try {
 			if (this.results == null) {
-				TupleBuffer buffer = bufferManager.createTupleBuffer(this.schema, "cached", TupleSourceType.FINAL); //$NON-NLS-1$
+				List<ElementSymbol> schema = new ArrayList<ElementSymbol>(types.length);
+				for (String type : types) {
+					ElementSymbol es = new ElementSymbol("x"); //$NON-NLS-1$
+					es.setType(DataTypeManager.getDataTypeClass(type));
+					schema.add(es);
+				}
+				TupleBuffer buffer = bufferManager.createTupleBuffer(schema, "cached", TupleSourceType.FINAL); //$NON-NLS-1$
 				buffer.setBatchSize(this.batchSize);
-	
+				if (this.hint != null) {
+					buffer.setPrefersMemory(this.hint.getPrefersMemory());
+				}
 				for (UUID uuid : this.cachedBatches) {
 					TupleBatch batch =  (TupleBatch)cache.get(uuid);
 					if (batch != null) {					

Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -23,6 +23,7 @@
 package org.teiid.dqp.internal.process;
 
 import java.sql.DatabaseMetaData;
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -64,7 +65,9 @@
 import org.teiid.metadata.Schema;
 import org.teiid.metadata.Table;
 import org.teiid.query.metadata.CompositeMetadataStore;
+import org.teiid.query.metadata.TempMetadataID;
 import org.teiid.query.metadata.TransformationMetadata;
+import org.teiid.query.optimizer.relational.RelationalPlanner;
 import org.teiid.query.processor.CollectionTupleSource;
 import org.teiid.query.processor.ProcessorDataManager;
 import org.teiid.query.sql.lang.Command;
@@ -73,6 +76,8 @@
 import org.teiid.query.sql.lang.UnaryFromClause;
 import org.teiid.query.sql.symbol.Constant;
 import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.tempdata.TempTableStore;
+import org.teiid.query.tempdata.TempTableStore.MatTableInfo;
 import org.teiid.query.util.CommandContext;
 
 /**
@@ -92,7 +97,8 @@
 		KEYCOLUMNS,
 		PROCEDUREPARAMS,
 		REFERENCEKEYCOLUMNS,
-		PROPERTIES
+		PROPERTIES,
+		MATVIEWS
 	}
 	
 	private enum SystemProcs {
@@ -115,7 +121,7 @@
 		RequestWorkItem workItem = requestMgr.getRequestWorkItem((RequestID)context.getProcessorID());
 		
 		if(CoreConstants.SYSTEM_MODEL.equals(modelName)) {
-			return processSystemQuery(command, workItem.getDqpWorkContext());
+			return processSystemQuery(context, command, workItem.getDqpWorkContext());
 		}
 		
 		AtomicRequestMessage aqr = createRequest(context.getProcessorID(), command, modelName, connectorBindingId, nodeID);
@@ -132,7 +138,7 @@
 	 * @throws TeiidComponentException
 	 */
 	@SuppressWarnings("unchecked")
-	private TupleSource processSystemQuery(Command command,
+	private TupleSource processSystemQuery(CommandContext context, Command command,
 			DQPWorkContext workContext) throws TeiidComponentException {
 		String vdbName = workContext.getVdbName();
 		int vdbVersion = workContext.getVdbVersion();
@@ -254,6 +260,33 @@
 								}
 							}
 							break;
+						case MATVIEWS:
+							if (table.isMaterialized()) {
+								String targetSchema = null;
+								String matTableName = null;
+								String state = null;
+								Timestamp updated = null;
+								Integer cardinaltity = null;
+								
+								if (table.getMaterializedTable() == null) {
+									TempTableStore globalStore = context.getGlobalTableStore();
+									matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
+									MatTableInfo info = globalStore.getMatTableInfo(matTableName);
+									state = info.getState().name();
+									updated = info.getUpdateTime()==-1?null:new Timestamp(info.getUpdateTime());
+									TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
+									if (id != null) {
+										cardinaltity = id.getCardinality();
+									}
+									//ttl, pref_mem
+								} else {
+									Table t = table.getMaterializedTable();
+									matTableName = t.getName();
+									targetSchema = t.getParent().getName();
+								}
+								rows.add(Arrays.asList(vdbName, schema.getName(), table.getName(), targetSchema, matTableName, state, updated, cardinaltity));
+							}
+							break;
 						}
 					}
 				}

Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -60,6 +60,7 @@
 import org.teiid.query.analysis.AnalysisRecord;
 import org.teiid.query.execution.QueryExecPlugin;
 import org.teiid.query.function.metadata.FunctionMethod;
+import org.teiid.query.parser.ParseInfo;
 import org.teiid.query.processor.BatchCollector;
 import org.teiid.query.processor.QueryProcessor;
 import org.teiid.query.sql.lang.Command;
@@ -333,25 +334,30 @@
 
 	protected void processNew() throws TeiidProcessingException, TeiidComponentException {
 		SessionAwareCache<CachedResults> rsCache = dqpCore.getRsCache();
-		CacheID cacheId = new CacheID(this.dqpWorkContext, Request.createParseInfo(requestMsg), requestMsg.getCommandString());
+		ParseInfo pi = Request.createParseInfo(requestMsg);
+		CacheID cacheId = new CacheID(this.dqpWorkContext, pi, requestMsg.getCommandString());
     	cacheId.setParameters(requestMsg.getParameterValues());
 		if (rsCache != null) {
 			CachedResults cr = rsCache.get(cacheId);
-			if (cr != null && (requestMsg.useResultSetCache() || cr.getCommand().isCache())) {
+			if (cr != null && (requestMsg.useResultSetCache() || cr.getHint() != null)) {
 				this.resultsBuffer = cr.getResults();
 				this.analysisRecord = cr.getAnalysisRecord();
-				this.originalCommand = cr.getCommand();
+				request.initMetadata();
+				this.originalCommand = cr.getCommand(requestMsg.getCommandString(), request.metadata, pi);
 				this.doneProducingBatches();
 				return;
 			}
 		}
 		request.processRequest();
 		originalCommand = request.userCommand;
-        if ((requestMsg.useResultSetCache() || originalCommand.isCache()) && rsCache != null && originalCommand.areResultsCachable()) {
+        if ((requestMsg.useResultSetCache() || originalCommand.getCacheHint() != null) && rsCache != null && originalCommand.areResultsCachable()) {
         	this.cid = cacheId;
         }
 		processor = request.processor;
 		resultsBuffer = processor.createTupleBuffer();
+		if (this.cid != null) {
+			resultsBuffer.setPrefersMemory(originalCommand.getCacheHint().getPrefersMemory());
+		}
 		collector = new BatchCollector(processor, resultsBuffer) {
 			protected void flushBatchDirect(TupleBatch batch, boolean add) throws TeiidComponentException,TeiidProcessingException {
 				boolean added = false;

Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -196,6 +196,10 @@
 			}
 		}
 		
+		public String getSql() {
+			return sql;
+		}
+		
 		public void setUserName(String name) {
 			this.userName = name;
 		}

Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -926,16 +926,14 @@
         		//not use cache
         		qnode = metadata.getVirtualPlan(metadataID);
         		//TODO: update the table for defaultMat
-        		recordMaterializationTableAnnotation(virtualGroup, analysisRecord, matTableName, 
-        				QueryPlugin.Util.getString("SimpleQueryResolver.materialized_table_not_used", virtualGroup, matTableName)); //$NON-NLS-1$
+        		recordMaterializationTableAnnotation(analysisRecord, QueryPlugin.Util.getString("SimpleQueryResolver.materialized_table_not_used", virtualGroup, matTableName)); //$NON-NLS-1$
         	}else{
         		qnode = new QueryNode(groupName, null);
         		Query query = createMatViewQuery(matMetadataId, matTableName, Arrays.asList(new AllSymbol()), isImplicitGlobal);
         		query.setCacheHint(hint);
         		qnode.setCommand(query);
                 cacheString = "matview"; //$NON-NLS-1$
-                recordMaterializationTableAnnotation(virtualGroup, analysisRecord, matTableName, 
-        				QueryPlugin.Util.getString("SimpleQueryResolver.Query_was_redirected_to_Mat_table", virtualGroup, matTableName)); //$NON-NLS-1$
+                recordMaterializationTableAnnotation(analysisRecord, QueryPlugin.Util.getString("SimpleQueryResolver.Query_was_redirected_to_Mat_table", virtualGroup, matTableName)); //$NON-NLS-1$
         	}
         } else {
             // Not a materialized view - query the primary transformation
@@ -986,15 +984,14 @@
 					//add timestamp?
 					Command c = getCommand(table, metadata.getVirtualPlan(table.getMetadataID()), SQLConstants.Reserved.SELECT, metadata);
 					CacheHint hint = c.getCacheHint();
-					if (hint == null) {
-						hint = new CacheHint();
-					} else {
-						recordMaterializationTableAnnotation(table, analysisRecord, matTableName, 
-		        				QueryPlugin.Util.getString("SimpleQueryResolver.cache_hint_used", table, matTableName, hint)); //$NON-NLS-1$
+					if (hint != null) {
+						recordMaterializationTableAnnotation(analysisRecord, QueryPlugin.Util.getString("SimpleQueryResolver.cache_hint_used", table, matTableName, hint)); //$NON-NLS-1$
 					}
 					id.setCacheHint(hint);
 				}
 			}
+		} else if (id.getCacheHint() != null) {
+			recordMaterializationTableAnnotation(analysisRecord, QueryPlugin.Util.getString("SimpleQueryResolver.cache_hint_used", table, matTableName, id.getCacheHint())); //$NON-NLS-1$
 		}
 		return id;
 	}
@@ -1054,9 +1051,8 @@
         return false;
     }
     
-    private static void recordMaterializationTableAnnotation(GroupSymbol virtualGroup,
-                                                      AnalysisRecord analysis,
-                                                      String matTableName, String msg) {
+    private static void recordMaterializationTableAnnotation(AnalysisRecord analysis,
+                                                      String msg) {
         if ( analysis.recordAnnotations() ) {
             Annotation annotation = new Annotation(Annotation.MATERIALIZED_VIEW, 
                                                          msg, 

Modified: trunk/engine/src/main/java/org/teiid/query/sql/LanguageObject.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/LanguageObject.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/query/sql/LanguageObject.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -22,7 +22,6 @@
 
 package org.teiid.query.sql;
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -31,7 +30,7 @@
  * key interfaces and adds some additional methods to allow the {@link LanguageVisitor}
  * to work.
  */
-public interface LanguageObject extends Serializable, Cloneable {
+public interface LanguageObject extends Cloneable {
 
     /**
      * Method for accepting a visitor.  It is the responsibility of the 

Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/Command.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/Command.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/Command.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -319,10 +319,6 @@
     	this.plan = plan;
     }
     
-    public boolean isCache() {
-		return cacheHint != null;
-	}
-    
     public CacheHint getCacheHint() {
 		return cacheHint;
 	}

Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -173,86 +173,105 @@
 			return null;
 		}
 		final String tableName = group.getNonCorrelationName().toUpperCase();
+		boolean remapColumns = !tableName.equalsIgnoreCase(group.getName());
 		TempTable table = null;
 		if (group.isGlobalTable()) {
 			TempTableStore globalStore = context.getGlobalTableStore();
 			MatTableInfo info = globalStore.getMatTableInfo(tableName);
 			boolean load = info.shouldLoad();
 			if (load) {
-				QueryMetadataInterface metadata = context.getMetadata();
-				Create create = new Create();
-				create.setTable(group);
-				create.setColumns(ResolverUtil.resolveElementsInGroup(group, metadata));
-				Object pk = metadata.getPrimaryKey(group.getMetadataID());
-				if (pk != null) {
-					for (Object col : metadata.getElementIDsInKey(pk)) {
-						create.getPrimaryKey().add(create.getColumns().get(metadata.getPosition(col)-1));
-					}
-				}
-				table = globalStore.addTempTable(tableName, create, bufferManager);
-				CacheHint hint = table.getCacheHint();
-				table.setUpdatable(false);
-				table.setPreferMemory(hint.getPrefersMemory());
-				boolean success = false;
-				try {
-					//TODO: order by primary key nulls first - then have an insert ordered optimization
-					//TODO: use the getCommand logic in RelationalPlanner to reuse commands for this.
-					String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
-		    		QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, group.getCanonicalName(), context);
-		    		qp.setNonBlocking(true);
-		    		TupleSource ts = new BatchCollector.BatchProducerTupleSource(qp);
-		    		//TODO: if this insert fails, it's unnecessary to do the undo processing
-		    		table.insert(ts, table.getColumns());
-		    		success = true;
-				} finally {
-					if (!success) {
-						globalStore.removeTempTableByName(tableName);
-					}
-					info.setState(success?MatState.LOADED:MatState.FAILED_LOAD);
-					if (table.getCacheHint().getTtl() != null) {
-						info.setTtl(table.getCacheHint().getTtl());
-					}
-				}
+				table = loadGlobalTable(context, group, tableName, globalStore, info);
 			} else {
 				table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
 			}
 		} else {
 			table = contextStore.getOrCreateTempTable(tableName, query, bufferManager, true);
 		}
-		//convert to the actual table symbols (this is typically handled by the languagebridgefactory
-		ExpressionMappingVisitor emv = new ExpressionMappingVisitor(null) {
-			@Override
-			public Expression replaceExpression(Expression element) {
-				if (element instanceof ElementSymbol) {
-					ElementSymbol es = (ElementSymbol)element;
-					((ElementSymbol) element).setName(tableName + ElementSymbol.SEPARATOR + es.getShortName());
+		if (remapColumns) {
+			//convert to the actual table symbols (this is typically handled by the languagebridgefactory
+			ExpressionMappingVisitor emv = new ExpressionMappingVisitor(null) {
+				@Override
+				public Expression replaceExpression(Expression element) {
+					if (element instanceof ElementSymbol) {
+						ElementSymbol es = (ElementSymbol)element;
+						((ElementSymbol) element).setName(tableName + ElementSymbol.SEPARATOR + es.getShortName());
+					}
+					return element;
 				}
-				return element;
-			}
-		};
-		PostOrderNavigator.doVisit(query, emv);
+			};
+			PostOrderNavigator.doVisit(query, emv);
+		}
 		return table.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy());
 	}
 
+	private TempTable loadGlobalTable(CommandContext context,
+			GroupSymbol group, final String tableName,
+			TempTableStore globalStore, MatTableInfo info)
+			throws QueryMetadataException, TeiidComponentException,
+			TeiidProcessingException, ExpressionEvaluationException {
+		TempTable table;
+		QueryMetadataInterface metadata = context.getMetadata();
+		Create create = new Create();
+		create.setTable(group);
+		create.setColumns(ResolverUtil.resolveElementsInGroup(group, metadata));
+		Object pk = metadata.getPrimaryKey(group.getMetadataID());
+		if (pk != null) {
+			for (Object col : metadata.getElementIDsInKey(pk)) {
+				create.getPrimaryKey().add(create.getColumns().get(metadata.getPosition(col)-1));
+			}
+		}
+		table = globalStore.addTempTable(tableName, create, bufferManager);
+		table.setUpdatable(false);
+		CacheHint hint = table.getCacheHint();
+		if (hint != null) {
+			table.setPreferMemory(hint.getPrefersMemory());
+			if (hint.getTtl() != null) {
+				info.setTtl(table.getCacheHint().getTtl());
+			}
+		}
+		boolean success = false;
+		try {
+			//TODO: order by primary key nulls first - then have an insert ordered optimization
+			//TODO: use the getCommand logic in RelationalPlanner to reuse commands for this.
+			String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
+			QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, group.getCanonicalName(), context);
+			qp.setNonBlocking(true);
+			TupleSource ts = new BatchCollector.BatchProducerTupleSource(qp);
+			//TODO: if this insert fails, it's unnecessary to do the undo processing
+			table.insert(ts, table.getColumns());
+			success = true;
+		} finally {
+			if (!success) {
+				globalStore.removeTempTableByName(tableName);
+			}
+			info.setState(success?MatState.LOADED:MatState.FAILED_LOAD);
+		}
+		return table;
+	}
+
 	public Object lookupCodeValue(CommandContext context, String codeTableName,
 			String returnElementName, String keyElementName, Object keyValue)
 			throws BlockedException, TeiidComponentException,
 			TeiidProcessingException {
-    	ElementSymbol keyElement = new ElementSymbol(keyElementName);
-    	ElementSymbol returnElement = new ElementSymbol(returnElementName);
+    	String matTableName = CODE_PREFIX + (codeTableName + ElementSymbol.SEPARATOR + keyElementName + ElementSymbol.SEPARATOR + returnElementName).toUpperCase(); 
+
+    	ElementSymbol keyElement = new ElementSymbol(matTableName + ElementSymbol.SEPARATOR + keyElementName);
+    	ElementSymbol returnElement = new ElementSymbol(matTableName + ElementSymbol.SEPARATOR + returnElementName);
     	
     	QueryMetadataInterface metadata = context.getMetadata();
     	
     	keyElement.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(metadata.getElementID(codeTableName + ElementSymbol.SEPARATOR + keyElementName))));
     	returnElement.setType(DataTypeManager.getDataTypeClass(metadata.getElementType(metadata.getElementID(codeTableName + ElementSymbol.SEPARATOR + returnElementName))));
     	
-    	String matTableName = CODE_PREFIX + (codeTableName + ElementSymbol.SEPARATOR + keyElementName + ElementSymbol.SEPARATOR + returnElementName).toUpperCase(); 
-    	TempMetadataID id = context.getGlobalTableStore().getMetadataStore().addTempGroup(matTableName, Arrays.asList(keyElement, returnElement), false, true);
-    	String queryString = Reserved.SELECT + ' ' + keyElementName + " ," + returnElementName + ' ' + Reserved.FROM + ' ' + codeTableName; //$NON-NLS-1$ 
-    	id.setQueryNode(new QueryNode(matTableName, queryString));
-    	id.setPrimaryKey(id.getElements().subList(0, 1));
-    	CacheHint hint = new CacheHint(true, null);
-    	id.setCacheHint(hint);
+    	TempMetadataID id = context.getGlobalTableStore().getMetadataStore().getTempGroupID(matTableName);
+    	if (id == null) {
+	    	id = context.getGlobalTableStore().getMetadataStore().addTempGroup(matTableName, Arrays.asList(keyElement, returnElement), false, true);
+	    	String queryString = Reserved.SELECT + ' ' + keyElementName + " ," + returnElementName + ' ' + Reserved.FROM + ' ' + codeTableName; //$NON-NLS-1$ 
+	    	id.setQueryNode(new QueryNode(matTableName, queryString));
+	    	id.setPrimaryKey(id.getElements().subList(0, 1));
+	    	CacheHint hint = new CacheHint(true, null);
+	    	id.setCacheHint(hint);
+    	}
     	Query query = RelationalPlanner.createMatViewQuery(id, matTableName, Arrays.asList(returnElement), true);
     	query.setCriteria(new CompareCriteria(keyElement, CompareCriteria.EQ, new Constant(keyValue)));
     	

Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -39,6 +39,7 @@
 import org.teiid.core.TeiidComponentException;
 import org.teiid.core.types.DataTypeManager;
 import org.teiid.dqp.service.FakeBufferService;
+import org.teiid.query.sql.lang.Query;
 import org.teiid.query.sql.symbol.ElementSymbol;
 
 
@@ -94,7 +95,7 @@
 		
 		CachedResults results = new CachedResults();
 		results.setResults(tb);
-		
+		results.setCommand(new Query());
 		Cache cache = new DefaultCache("dummy", 250); //$NON-NLS-1$
 		results.prepare(cache, fbs.getBufferManager());
 		

Modified: trunk/engine/src/test/java/org/teiid/dqp/message/TestAtomicRequestMessage.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/message/TestAtomicRequestMessage.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/engine/src/test/java/org/teiid/dqp/message/TestAtomicRequestMessage.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -22,26 +22,18 @@
 
 package org.teiid.dqp.message;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
 
+import org.junit.Ignore;
+import org.junit.Test;
 import org.teiid.client.RequestMessage;
 import org.teiid.core.util.UnitTestUtil;
 import org.teiid.dqp.internal.datamgr.TestQueryImpl;
 import org.teiid.dqp.internal.process.DQPWorkContext;
-import org.teiid.dqp.message.AtomicRequestMessage;
-import org.teiid.dqp.message.RequestID;
 
+ at Ignore(value="Serialization of language objects has been turned off")
+public class TestAtomicRequestMessage {
 
-public class TestAtomicRequestMessage extends TestCase {
-
-    /**
-     * Constructor for TestAtomicRequestMessage.
-     * @param name
-     */
-    public TestAtomicRequestMessage(String name) {
-        super(name);
-    }
-
     public static AtomicRequestMessage example() {
         RequestMessage rm = new RequestMessage();
         DQPWorkContext workContext = new DQPWorkContext();
@@ -57,7 +49,7 @@
         return message;
     }
 
-    public void testSerialize() throws Exception {
+    @Test public void testSerialize() throws Exception {
     	AtomicRequestMessage example = example();
     	AtomicRequestMessage copy = UnitTestUtil.helpSerialize(example);
 

Modified: trunk/metadata/src/main/resources/System.vdb
===================================================================
(Binary files differ)

Modified: trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -56,10 +56,8 @@
  */
 @SuppressWarnings("nls")
 public class TestMMDatabaseMetaData {
-	
- 
     
-    private static final boolean REPLACE_EXPECTED = true;
+    private static final boolean REPLACE_EXPECTED = false;
     private static final boolean WRITE_ACTUAL_RESULTS_TO_FILE = false;
     private static final boolean PRINT_RESULTSETS_TO_CONSOLE = false;
     
@@ -476,14 +474,13 @@
         try {
             java.sql.Statement stmt = conn.createStatement();
             
-            // Returns 0 rows (but should be identical and return 24 rows):
             rs = stmt.executeQuery("SELECT Name FROM SYS.Tables WHERE UCASE(SchemaName) = 'SYS'"); //$NON-NLS-1$
 
             int count = 0;
             while(rs.next()) {
                 count++;
             }
-            assertEquals(11, count);
+            assertEquals(12, count);
         } finally {
             if(rs != null) {
                 rs.close();

Added: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java	                        (rev 0)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.systemmodel;
+
+import static org.junit.Assert.*;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.teiid.core.util.UnitTestUtil;
+import org.teiid.jdbc.FakeServer;
+
+ at SuppressWarnings("nls")
+public class TestMatViews {
+	
+    private Connection conn;
+
+	@Before public void setUp() throws Exception {
+    	FakeServer server = new FakeServer();
+    	server.deployVDB("matviews", UnitTestUtil.getTestDataPath() + "/matviews.vdb");
+    	conn = server.createConnection("jdbc:teiid:matviews");
+    }
+	
+	@Test public void testSystemMatViews() throws Exception {
+		Statement s = conn.createStatement();
+		ResultSet rs = s.executeQuery("select * from SYS.MatViews order by name");
+		assertTrue(rs.next());
+		assertEquals("NOT_LOADED", rs.getString("state"));
+		assertEquals("#MAT_TEST.ERRORVIEW", rs.getString("targetName"));
+		assertTrue(rs.next());
+		assertEquals("NOT_LOADED", rs.getString("state"));
+		assertEquals("#MAT_TEST.MATVIEW", rs.getString("targetName"));
+		assertFalse(rs.next());
+		rs = s.executeQuery("select * from MatView");
+		assertTrue(rs.next());
+		rs = s.executeQuery("select * from SYS.MatViews where name = 'MatView'");
+		assertTrue(rs.next());
+		assertEquals("LOADED", rs.getString("state"));
+		try {
+			s.executeQuery("select * from ErrorView");
+		} catch (SQLException e) {
+			
+		}
+		rs = s.executeQuery("select * from SYS.MatViews where name = 'ErrorView'");
+		assertTrue(rs.next());
+		assertEquals("FAILED_LOAD", rs.getString("state"));
+	}
+
+}


Property changes on: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCSchema.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCSchema.java	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestODBCSchema.java	2010-08-10 11:01:40 UTC (rev 2433)
@@ -1,5 +1,7 @@
 package org.teiid.systemmodel;
 
+import static org.junit.Assert.*;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.teiid.core.util.UnitTestUtil;
@@ -76,5 +78,13 @@
 	@Test public void test_PG_USER()  throws Exception {
 		execute("select * FROM pg_user"); //$NON-NLS-1$
 		TestMMDatabaseMetaData.compareResultSet(this.internalResultSet);
-	}	
+	}
+	
+	@Test public void testOIDUniquness() throws Exception {
+		for (String table : new String[] {"Tables", "Columns", "Schemas", "DataTypes", "Keys", "Procedures", "ProcedureParams", "Properties"}) {
+			execute("select count(distinct oid), count(*) from SYS."+table);
+			internalResultSet.next();
+			assertEquals(internalResultSet.getInt(2), internalResultSet.getInt(1));
+		}
+	}
 }

Modified: trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -22,10 +22,11 @@
 test                                                               pg_catalog                                                         pg_trigger                                                         SYSTEM TABLE                                                       <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 test                                                               pg_catalog                                                         pg_type                                                            SYSTEM TABLE                                                       <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 test                                                               pg_catalog                                                         pg_user                                                            SYSTEM TABLE                                                       <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
+test                                                               SYS                                                                MatViews                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 test                                                               test                                                               all_databases                                                      TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 test                                                               test                                                               all_models                                                         TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 test                                                               test                                                               all_tables                                                         TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
-Row Count : 25
+Row Count : 26
 getColumnName              getColumnType  getCatalogName  getColumnClassName  getColumnLabel             getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT                  12             test            java.lang.String    TABLE_CAT                  string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 TABLE_SCHEM                12             test            java.lang.String    TABLE_SCHEM                string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -363,6 +363,14 @@
 QT_Ora9DS                                                          BQT2                                                               LargeB                                                             BigDecimalValue                                                    2          bigdecimal                                                         20           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             126                16                NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          BQT1                                                               LargeB                                                             ObjectValue                                                        2000       object                                                             2048         <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             2048               17                NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          BQT2                                                               LargeB                                                             ObjectValue                                                        2000       object                                                             2048         <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             2048               17                NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           VDBName                                                            12         string                                                             255          <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                1                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           SchemaName                                                         12         string                                                             255          <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                2                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           Name                                                               12         string                                                             255          <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                3                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           TargetSchemaName                                                   12         string                                                             255          <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                4                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           TargetName                                                         12         string                                                             4000         <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             4000               5                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           State                                                              12         string                                                             255          <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                6                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           Updated                                                            93         timestamp                                                          29           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  7                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           Cardinality                                                        4          integer                                                            10           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             10                 8                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          BQT1                                                               MediumA                                                            IntKey                                                             4          integer                                                            22           <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  1                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          BQT2                                                               MediumA                                                            IntKey                                                             4          integer                                                            22           <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  1                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          BQT1                                                               MediumA                                                            StringKey                                                          12         string                                                             10           <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             10                 2                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
@@ -1057,7 +1065,7 @@
 QT_Ora9DS                                                          XQT                                                                xqtFullData                                                        BigIntegerValue                                                    2          biginteger                                                         19           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             28                 15                NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          XQT                                                                xqtFullData                                                        BigDecimalValue                                                    2          bigdecimal                                                         20           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             126                16                NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 QT_Ora9DS                                                          XQT                                                                xqtFullData                                                        ObjectValue                                                        2000       object                                                             2048         <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             2048               17                NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
-Row Count : 1057
+Row Count : 1065
 getColumnName      getColumnType  getCatalogName  getColumnClassName  getColumnLabel     getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT          12             QT_Ora9DS       java.lang.String    TABLE_CAT          string             SYS            Columns       255                   255           0         false            false            false       false                 0           true        true          false     false       
 TABLE_SCHEM        12             QT_Ora9DS       java.lang.String    TABLE_SCHEM        string             SYS            Columns       255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -56,6 +56,7 @@
 QT_Ora9DS                                                          BQT2                                                               MediumB                                                            TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallA                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallB                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          VQT                                                                Base.Agg1                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg2                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg3                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
@@ -132,7 +133,7 @@
 QT_Ora9DS                                                          XQTNestedDoc                                                       testOptimizableTempTable.MappingClasses.moveToRootTempTable        XMLSTAGINGTABLE                                                    <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQTNestedDoc                                                       testRootTempTable.MappingClasses.TemporaryTable1                   XMLSTAGINGTABLE                                                    <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQTRecursiveDoc                                                    testSimpleTempTable.MappingClasses.TemporaryTable1                 XMLSTAGINGTABLE                                                    <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
-Row Count : 132
+Row Count : 133
 getColumnName              getColumnType  getCatalogName  getColumnClassName  getColumnLabel             getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT                  12             QT_Ora9DS       java.lang.String    TABLE_CAT                  string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 TABLE_SCHEM                12             QT_Ora9DS       java.lang.String    TABLE_SCHEM                string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -56,6 +56,7 @@
 QT_Ora9DS                                                          BQT2                                                               MediumB                                                            TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallA                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallB                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          VQT                                                                Base.Agg1                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg2                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg3                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
@@ -132,7 +133,7 @@
 QT_Ora9DS                                                          XQTNestedDoc                                                       testOptimizableTempTable.MappingClasses.moveToRootTempTable        XMLSTAGINGTABLE                                                    <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQTNestedDoc                                                       testRootTempTable.MappingClasses.TemporaryTable1                   XMLSTAGINGTABLE                                                    <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQTRecursiveDoc                                                    testSimpleTempTable.MappingClasses.TemporaryTable1                 XMLSTAGINGTABLE                                                    <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
-Row Count : 132
+Row Count : 133
 getColumnName              getColumnType  getCatalogName  getColumnClassName  getColumnLabel             getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT                  12             QT_Ora9DS       java.lang.String    TABLE_CAT                  string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 TABLE_SCHEM                12             QT_Ora9DS       java.lang.String    TABLE_SCHEM                string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -16,6 +16,7 @@
 QT_Ora9DS                                                          BQT2                                                               MediumB                                                            TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallA                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallB                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          VQT                                                                Base.Agg1                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg2                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg3                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
@@ -49,7 +50,7 @@
 QT_Ora9DS                                                          VQT                                                                Union.U9                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQT                                                                xqtData                                                            TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQT                                                                xqtFullData                                                        TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
-Row Count : 49
+Row Count : 50
 getColumnName              getColumnType  getCatalogName  getColumnClassName  getColumnLabel             getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT                  12             QT_Ora9DS       java.lang.String    TABLE_CAT                  string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 TABLE_SCHEM                12             QT_Ora9DS       java.lang.String    TABLE_SCHEM                string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -16,6 +16,7 @@
 QT_Ora9DS                                                          BQT2                                                               MediumB                                                            TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallA                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          BQT2                                                               SmallB                                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
+QT_Ora9DS                                                          SYS                                                                MatViews                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 QT_Ora9DS                                                          VQT                                                                Base.Agg1                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg2                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          VQT                                                                Base.Agg3                                                          TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
@@ -49,7 +50,7 @@
 QT_Ora9DS                                                          VQT                                                                Union.U9                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQT                                                                xqtData                                                            TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
 QT_Ora9DS                                                          XQT                                                                xqtFullData                                                        TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             false     
-Row Count : 49
+Row Count : 50
 getColumnName              getColumnType  getCatalogName  getColumnClassName  getColumnLabel             getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT                  12             QT_Ora9DS       java.lang.String    TABLE_CAT                  string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 TABLE_SCHEM                12             QT_Ora9DS       java.lang.String    TABLE_SCHEM                string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -86,6 +86,14 @@
 1957953763   -1056482755  RefKeyUID                                                          1043         50      9       50           false       false         false    
 -1864727535  -1056482755  UID                                                                1043         50      10      50           false       false         false    
 120374768    -1056482755  OID                                                                <null>       10      11      10           false       false         false    
+1518497335   -2028080981  VDBName                                                            1043         255     1       255          false       false         false    
+-1436081057  -2028080981  SchemaName                                                         1043         255     2       255          false       false         false    
+829635174    -2028080981  Name                                                               1043         255     3       255          false       false         false    
+-1827861927  -2028080981  TargetSchemaName                                                   1043         255     4       255          false       false         false    
+-767393364   -2028080981  TargetName                                                         1043         4000    5       4000         false       false         false    
+-1140134170  -2028080981  State                                                              1043         255     6       255          false       false         false    
+107574265    -2028080981  Updated                                                            1114         0       7       0            false       false         false    
+-1942479773  -2028080981  Cardinality                                                        <null>       10      8       10           false       false         false    
 1975537358   1809992480   VDBName                                                            1043         255     1       255          false       false         false    
 -944775923   1809992480   SchemaName                                                         1043         255     2       255          false       false         false    
 2030457340   1809992480   ProcedureName                                                      1043         255     3       255          false       false         false    
@@ -225,7 +233,7 @@
 717511814    -164161188   usename                                                            1043         0       2       0            false       false         false    
 1288630002   -164161188   usecreatedb                                                        16           0       3       0            false       false         false    
 1033115127   -164161188   usesuper                                                           16           0       4       0            false       false         false    
-Row Count : 225
+Row Count : 233
 getColumnName  getColumnType  getCatalogName  getColumnClassName  getColumnLabel  getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 oid            4              PartsSupplier   java.lang.Integer   oid             integer            pg_catalog     pg_attribute  11                    10            0         false            false            false       false                 2           true        true          false     false       
 attrelid       4              PartsSupplier   java.lang.Integer   attrelid        integer            pg_catalog     pg_attribute  11                    10            0         false            false            false       false                 2           true        true          false     false       

Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -9,6 +9,7 @@
 407729263    DataTypes                                                          -2075981161   r        0            0.0                     0            false        false                                                            
 1906549043   KeyColumns                                                         -2075981161   r        0            0.0                     0            false        false                                                            
 -1056482755  Keys                                                               -2075981161   r        0            0.0                     0            false        false                                                            
+-2028080981  MatViews                                                           -2075981161   r        0            0.0                     0            false        false                                                            
 1809992480   ProcedureParams                                                    -2075981161   r        0            0.0                     0            false        false                                                            
 -364939653   Procedures                                                         -2075981161   r        0            0.0                     0            false        false                                                            
 -1169068629  Properties                                                         -2075981161   r        0            0.0                     0            false        false                                                            
@@ -27,7 +28,7 @@
 1533609944   pg_attrdef                                                         -915078125    v        0            0.0                     0            false        false                                                            
 209142477    pg_database                                                        -915078125    v        0            0.0                     0            false        false                                                            
 -164161188   pg_user                                                            -915078125    v        0            0.0                     0            false        false                                                            
-Row Count : 27
+Row Count : 28
 getColumnName  getColumnType  getCatalogName  getColumnClassName  getColumnLabel  getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 oid            4              PartsSupplier   java.lang.Integer   oid             integer            pg_catalog     pg_class      11                    10            0         false            false            false       false                 2           true        true          false     false       
 relname        12             PartsSupplier   java.lang.String    relname         string             pg_catalog     pg_class      4000                  4000          0         false            false            false       false                 2           true        true          false     false       

Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -69,6 +69,14 @@
 PartsSupplier                                                      SYS                                                                Keys                                                               RefKeyUID                                                          12         string                                                             50           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             50                 9                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      SYS                                                                Keys                                                               UID                                                                12         string                                                             50           <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             50                 10                YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      SYS                                                                Keys                                                               OID                                                                4          integer                                                            10           <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             10                 11                YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           VDBName                                                            12         string                                                             255          <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                1                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           SchemaName                                                         12         string                                                             255          <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                2                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           Name                                                               12         string                                                             255          <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                3                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           TargetSchemaName                                                   12         string                                                             255          <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                4                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           TargetName                                                         12         string                                                             4000         <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             4000               5                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           State                                                              12         string                                                             255          <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                6                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           Updated                                                            93         timestamp                                                          29           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  7                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
+PartsSupplier                                                      SYS                                                                MatViews                                                           Cardinality                                                        4          integer                                                            10           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             10                 8                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.PARTS                                                PART_ID                                                            12         string                                                             4            <null>                                                             0               10              0            <null>                                                             <null>                                                             <null>                                                             <null>                                                             4                  1                 YES                                                                <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.PARTS                                                PART_NAME                                                          12         string                                                             255          <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             255                2                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.PARTS                                                PART_COLOR                                                         12         string                                                             30           <null>                                                             0               10              1            <null>                                                             <null>                                                             <null>                                                             <null>                                                             30                 3                 NO                                                                 <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
@@ -225,7 +233,7 @@
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            usename                                                            12         string                                                             4000         <null>                                                             0               0               2            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  2                                                                                    <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            usecreatedb                                                        -7         boolean                                                            1            <null>                                                             0               0               2            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  3                                                                                    <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            usesuper                                                           -7         boolean                                                            1            <null>                                                             0               0               2            <null>                                                             <null>                                                             <null>                                                             <null>                                                             0                  4                                                                                    <null>                                                             <null>                                                             <null>     !
                                                         <null>                                                             NO                                                               
-Row Count : 225
+Row Count : 233
 getColumnName      getColumnType  getCatalogName  getColumnClassName  getColumnLabel     getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT          12             PartsSupplier   java.lang.String    TABLE_CAT          string             SYS            Columns       255                   255           0         false            false            false       false                 0           true        true          false     false       
 TABLE_SCHEM        12             PartsSupplier   java.lang.String    TABLE_SCHEM        string             SYS            Columns       255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -27,7 +27,8 @@
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.STATUS                                               TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.SUPPLIER                                             TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.SUPPLIER_PARTS                                       TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
-Row Count : 27
+PartsSupplier                                                      SYS                                                                MatViews                                                           TABLE                                                              <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             <null>                                                             true      
+Row Count : 28
 getColumnName              getColumnType  getCatalogName  getColumnClassName  getColumnLabel             getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 TABLE_CAT                  12             PartsSupplier   java.lang.String    TABLE_CAT                  string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 TABLE_SCHEM                12             PartsSupplier   java.lang.String    TABLE_SCHEM                string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -1,6 +1,7 @@
 string                                                             string                                                             string                                                             string                                                             integer      string                                                             string                                                             integer      integer      boolean        boolean         boolean          boolean          boolean   boolean     boolean            string                string                                              string                                              string                string                                                             string                                                             string                                                             integer      integer          integer      string                                           !
    string                                                             integer    
 VDBName                                                            SchemaName                                                         TableName                                                          Name                                                               Position     NameInSource                                                       DataType                                                           Scale        Length       IsLengthFixed  SupportsSelect  SupportsUpdates  IsCaseSensitive  IsSigned  IsCurrency  IsAutoIncremented  NullType              MinRange                                            MaxRange                                            SearchType            Format                                                             DefaultValue                                                       JavaClass                                                          Precision    CharOctetLength  Radix        UID                                              !
    Description                                                        OID        
 PartsSupplier                                                      SYS                                                                DataTypes                                                          BaseType                                                           17           <null>                                                             string                                                             0            64           true           true            false            true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   64           64               10           mmuuid:03beb57c-968b-4821-a6ae-cb1154cfadee      !
    <null>                                                             449930315  
+PartsSupplier                                                      SYS                                                                MatViews                                                           Cardinality                                                        8            <null>                                                             integer                                                            0            10           false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Integer                                                  0            10               10           mmuuid:c20875ac-5df8-4a3f-89af-c766af8f81b6      !
    <null>                                                             -1942479773
 PartsSupplier                                                      SYS                                                                Tables                                                             Cardinality                                                        9            <null>                                                             integer                                                            0            10           false          true            false            true             true      false       false              No Nulls              <null>                                              <null>                                              All Except Like       <null>                                                             <null>                                                             java.lang.Integer                                                  10           10               10           mmuuid:24cdad3a-e8f7-4376-bb32-79f8bc8eeed2      !
    <null>                                                             -827418434 
 PartsSupplier                                                      SYS                                                                Columns                                                            CharOctetLength                                                    25           <null>                                                             integer                                                            0            10           true           true            false            false            false     false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Integer                                                  10           10               10           mmuuid:de5def94-2804-4c91-91ed-26d630ce8afe      !
    <null>                                                             1904600238 
 PartsSupplier                                                      SYS                                                                ReferenceKeyColumns                                                DEFERRABILITY                                                      14           <null>                                                             integer                                                            0            10           false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Integer                                                  10           10               10           mmuuid:88380f55-2cbd-4325-b9a3-9dcaa88a690e      !
    <null>                                                             1757202753 
@@ -48,6 +49,7 @@
 PartsSupplier                                                      SYS                                                                DataTypes                                                          Name                                                               1            <null>                                                             string                                                             0            100          true           true            false            true             true      false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   100          100              10           mmuuid:17f7de33-e6f0-4b9c-b55e-a87f6b7bb9b3      !
    <null>                                                             988889238  
 PartsSupplier                                                      SYS                                                                KeyColumns                                                         Name                                                               4            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:08bda0c7-5f66-4fed-8285-d74b63eeb0e2      !
    <null>                                                             2034926350 
 PartsSupplier                                                      SYS                                                                Keys                                                               Name                                                               4            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:149de302-2107-45ca-839d-fc0dd1e7d7f4      !
    <null>                                                             425155393  
+PartsSupplier                                                      SYS                                                                MatViews                                                           Name                                                               3            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:75bd4c7c-71f9-44ee-be3a-16f82af5dec7      !
    <null>                                                             829635174  
 PartsSupplier                                                      SYS                                                                ProcedureParams                                                    Name                                                               4            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:2bf20c6f-5a95-436d-8f30-a24d164e77a4      !
    <null>                                                             -1008332542
 PartsSupplier                                                      SYS                                                                Procedures                                                         Name                                                               3            <null>                                                             string                                                             0            255          true           true            false            true             false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:bd17e98a-c40a-43b1-93ac-88d62937c051      !
    <null>                                                             -1887591430
 PartsSupplier                                                      SYS                                                                Properties                                                         Name                                                               1            <null>                                                             string                                                             0            255          true           true            false            true             true      false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:ba007c56-04b6-4981-ab89-3fdd33ff0de8      !
    <null>                                                             1640613833 
@@ -114,17 +116,21 @@
 PartsSupplier                                                      SYS                                                                Columns                                                            SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:859288c9-cd78-4407-90fc-61b5d310e2ab      !
    <null>                                                             1944775942 
 PartsSupplier                                                      SYS                                                                KeyColumns                                                         SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:787be966-cf12-4956-907f-a8e6dc1009dc      !
    <null>                                                             -1759292119
 PartsSupplier                                                      SYS                                                                Keys                                                               SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:4a7fc059-208e-4f98-b6ef-cb7c6102a327      !
    <null>                                                             1074685596 
+PartsSupplier                                                      SYS                                                                MatViews                                                           SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:ee14b6ad-9b87-41e5-8eb5-90262f9e0ec4      !
    <null>                                                             -1436081057
 PartsSupplier                                                      SYS                                                                ProcedureParams                                                    SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:88497911-619c-4ca8-b482-8885d940706a      !
    <null>                                                             -944775923 
 PartsSupplier                                                      SYS                                                                Procedures                                                         SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:53a84865-334e-4750-b343-de2411d56e3e      !
    <null>                                                             -1162137751
 PartsSupplier                                                      SYS                                                                Tables                                                             SchemaName                                                         2            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:95bd960c-fd84-44c9-9831-692376f69b46      !
    <null>                                                             -1168783734
 PartsSupplier                                                      SYS                                                                Columns                                                            SearchType                                                         20           <null>                                                             string                                                             0            20           true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   20           20               10           mmuuid:3037138a-bb20-4485-ba01-75bc20b1a532      !
    <null>                                                             -917271927 
 PartsSupplier                                                      SYS                                                                DataTypes                                                          SearchType                                                         14           <null>                                                             string                                                             0            20           true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   20           20               10           mmuuid:d8494fa3-40e4-44cd-b0d8-da5c83685a75      !
    <null>                                                             920862690  
+PartsSupplier                                                      SYS                                                                MatViews                                                           State                                                              6            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:d730c1a8-a8b1-4912-957d-f310506ec93b      !
    <null>                                                             -1140134170
 PartsSupplier                                                      SYS                                                                Columns                                                            SupportsSelect                                                     11           <null>                                                             boolean                                                            0            1            true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Boolean                                                  1            1                10           mmuuid:c2a50f93-0040-41ec-ad7b-e8511296555f      !
    <null>                                                             -1799446175
 PartsSupplier                                                      SYS                                                                Columns                                                            SupportsUpdates                                                    12           <null>                                                             boolean                                                            0            1            true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Boolean                                                  1            1                10           mmuuid:fab660d1-36bf-4a5b-bbe6-9a543e0ebd76      !
    <null>                                                             1376383558 
 PartsSupplier                                                      SYS                                                                Tables                                                             SupportsUpdates                                                    7            <null>                                                             boolean                                                            0            1            true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Boolean                                                  1            1                10           mmuuid:5144d230-2b0e-4255-b321-65b9f6f6f76c      !
    <null>                                                             -1060614397
 PartsSupplier                                                      SYS                                                                Columns                                                            TableName                                                          3            <null>                                                             string                                                             0            255          true           true            false            true             false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:2c09c9d1-2f25-45de-81cf-eeb2a5157d34      !
    <null>                                                             37248193   
 PartsSupplier                                                      SYS                                                                KeyColumns                                                         TableName                                                          3            <null>                                                             string                                                             0            2048         true           true            false            true             false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   2048         2048             10           mmuuid:c24fad72-0c0d-4260-96ae-f188ad77b137      !
    <null>                                                             -1594935697
 PartsSupplier                                                      SYS                                                                Keys                                                               TableName                                                          3            <null>                                                             string                                                             0            2048         true           true            false            true             false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   2048         2048             10           mmuuid:7d9540bd-b51f-4206-8c33-b39c5ba8bb8b      !
    <null>                                                             -1862131168
+PartsSupplier                                                      SYS                                                                MatViews                                                           TargetName                                                         5            <null>                                                             string                                                             0            4000         false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            4000             10           mmuuid:9433bf0c-1046-4b83-9539-862fc0e190c6      !
    <null>                                                             -767393364 
+PartsSupplier                                                      SYS                                                                MatViews                                                           TargetSchemaName                                                   4            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:544b39f9-5243-43ce-a0cb-747d91fc5c5e      !
    <null>                                                             -1827861927
 PartsSupplier                                                      SYS                                                                Keys                                                               Type                                                               7            <null>                                                             string                                                             0            20           true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   20           20               10           mmuuid:29e73c18-afec-43a9-81ab-7378d6daf20b      !
    <null>                                                             846555123  
 PartsSupplier                                                      SYS                                                                ProcedureParams                                                    Type                                                               7            <null>                                                             string                                                             0            100          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   100          100              10           mmuuid:76a1981b-1226-4a55-9acf-82a061cc8642      !
    <null>                                                             1405495099 
 PartsSupplier                                                      SYS                                                                Tables                                                             Type                                                               4            <null>                                                             string                                                             0            20           true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   20           20               10           mmuuid:4814a0af-4e8f-4f55-9b25-3148d90d3d9b      !
    <null>                                                             880927430  
@@ -141,9 +147,11 @@
 PartsSupplier                                                      SYS                                                                Schemas                                                            UID                                                                4            <null>                                                             string                                                             0            50           true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   50           50               10           mmuuid:ad232e4d-9c01-4d0c-bc57-0459d9db918a      !
    <null>                                                             1001441719 
 PartsSupplier                                                      SYS                                                                Tables                                                             UID                                                                8            <null>                                                             string                                                             0            50           true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   50           50               10           mmuuid:6afe3737-26f9-43a8-88db-86531b5dc66c      !
    <null>                                                             -175171634 
 PartsSupplier                                                      SYS                                                                ReferenceKeyColumns                                                UPDATE_RULE                                                        10           <null>                                                             integer                                                            0            10           false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Integer                                                  10           10               10           mmuuid:30d5ae74-b19e-4186-97e1-aeff5801e44f      !
    <null>                                                             -449329715 
+PartsSupplier                                                      SYS                                                                MatViews                                                           Updated                                                            7            <null>                                                             timestamp                                                          0            0            false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.sql.Timestamp                                                 0            0                10           mmuuid:8053993e-6653-473d-a8b5-7d73f26900b0      !
    <null>                                                             107574265  
 PartsSupplier                                                      SYS                                                                Columns                                                            VDBName                                                            1            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:83f19a81-1243-4751-8c99-daddbf37b1d7      !
    <null>                                                             625775649  
 PartsSupplier                                                      SYS                                                                KeyColumns                                                         VDBName                                                            1            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:f062eb9c-4854-47fb-b7bd-a4e23c782b62      !
    <null>                                                             854014254  
 PartsSupplier                                                      SYS                                                                Keys                                                               VDBName                                                            1            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:5785b523-7da3-42c1-8920-66daa1f7fa1d      !
    <null>                                                             -1451894484
+PartsSupplier                                                      SYS                                                                MatViews                                                           VDBName                                                            1            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:9498360d-1e16-4d16-b88f-d46cc75a03c2      !
    <null>                                                             1518497335 
 PartsSupplier                                                      SYS                                                                ProcedureParams                                                    VDBName                                                            1            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:f832f316-2403-43fa-9ccc-c3ab9d38acca      !
    <null>                                                             1975537358 
 PartsSupplier                                                      SYS                                                                Procedures                                                         VDBName                                                            1            <null>                                                             string                                                             0            255          true           true            false            false            false     false       false              No Nulls              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   255          255              10           mmuuid:1d664747-4a95-4605-8b28-381bed3121f1      !
    <null>                                                             675421827  
 PartsSupplier                                                      SYS                                                                Schemas                                                            VDBName                                                            1            <null>                                                             string                                                             0            255          false          true            true             true             true      false       false              Nullable              <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            255              10           mmuuid:73dbf95b-a283-4f0a-81b9-9b98e09c2906      !
    <null>                                                             1083046346 
@@ -225,7 +233,7 @@
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            usecreatedb                                                        3            <null>                                                             boolean                                                            0            0            false          true            false            false            false     false       false              Unknown               <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Boolean                                                  0            0                0            mmuuid:7f20dc11-f376-4da5-9fe5-139c2562b4c2      !
    <null>                                                             1288630002 
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            usename                                                            2            <null>                                                             string                                                             0            0            false          true            false            false            false     false       false              Unknown               <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.String                                                   0            0                0            mmuuid:8d148996-16a1-44d8-b5ff-06f9421415d4      !
    <null>                                                             717511814  
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            usesuper                                                           4            <null>                                                             boolean                                                            0            0            false          true            false            false            false     false       false              Unknown               <null>                                              <null>                                              Searchable            <null>                                                             <null>                                                             java.lang.Boolean                                                  0            0                0            mmuuid:f3434529-3e9a-4f11-90c0-b74374947902      !
    <null>                                                             1033115127 
-Row Count : 225
+Row Count : 233
 getColumnName      getColumnType  getCatalogName  getColumnClassName  getColumnLabel     getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 VDBName            12             PartsSupplier   java.lang.String    VDBName            string             SYS            Columns       255                   255           0         false            false            false       false                 0           true        true          false     false       
 SchemaName         12             PartsSupplier   java.lang.String    SchemaName         string             SYS            Columns       255                   255           0         false            true             false       true                  1           false       true          true      true        

Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -1,10 +1,11 @@
 string                                                           
 Name                                                             
+MatViews                                                         
 PARTSSUPPLIER.PARTS                                              
 PARTSSUPPLIER.SHIP_VIA                                           
 PARTSSUPPLIER.STATUS                                             
 PARTSSUPPLIER.SUPPLIER                                           
 PARTSSUPPLIER.SUPPLIER_PARTS                                     
-Row Count : 5
+Row Count : 6
 getColumnName  getColumnType  getCatalogName  getColumnClassName  getColumnLabel  getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 Name           12             PartsSupplier   java.lang.String    Name            string             SYS            Tables        255                   255           0         false            true             false       false                 0           true        true          false     false       

Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected	2010-08-10 00:43:33 UTC (rev 2432)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected	2010-08-10 11:01:40 UTC (rev 2433)
@@ -4,6 +4,7 @@
 PartsSupplier                                                      SYS                                                                DataTypes                                                          Table                 <null>                                                             true        false            mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957         0            <null>                                                             true      false           407729263  
 PartsSupplier                                                      SYS                                                                KeyColumns                                                         Table                 <null>                                                             true        false            mmuuid:14946083-3bd5-42d5-8283-1c0694347c29         0            <null>                                                             true      false           1906549043 
 PartsSupplier                                                      SYS                                                                Keys                                                               Table                 <null>                                                             true        false            mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108         0            <null>                                                             true      false           -1056482755
+PartsSupplier                                                      SYS                                                                MatViews                                                           Table                 <null>                                                             true        true             mmuuid:29f7718e-bd87-4fe0-8b8a-9fec44517de5         0            <null>                                                             false     false           -2028080981
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.PARTS                                                Table                 PARTS                                                              true        true             mmuuid:f6276601-73fe-1edc-a81c-ecf397b10590         16           <null>                                                             false     false           1623654648 
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.SHIP_VIA                                             Table                 SHIP_VIA                                                           true        true             mmuuid:0f4e9b80-73ff-1edc-a81c-ecf397b10590         4            <null>                                                             false     false           1136825257 
 PartsSupplier                                                      PartsSupplier                                                      PARTSSUPPLIER.STATUS                                               Table                 STATUS                                                             true        true             mmuuid:1f297200-73ff-1edc-a81c-ecf397b10590         3            <null>                                                             false     false           -1690137928
@@ -27,7 +28,7 @@
 PartsSupplier                                                      pg_catalog                                                         pg_trigger                                                         Table                 <null>                                                             false       false            mmuuid:dbdacb28-7e78-4ae5-8a99-3e3e1c59f641         0            <null>                                                             true      false           -77334293  
 PartsSupplier                                                      pg_catalog                                                         pg_type                                                            Table                 <null>                                                             false       false            mmuuid:8024e6eb-ba32-41a0-a250-95a36eb4b71f         0            <null>                                                             true      false           -136764222 
 PartsSupplier                                                      pg_catalog                                                         pg_user                                                            Table                 <null>                                                             false       false            mmuuid:0da462b7-bacf-41da-9335-9a12224c462a         0            <null>                                                             true      false           -164161188 
-Row Count : 27
+Row Count : 28
 getColumnName    getColumnType  getCatalogName  getColumnClassName  getColumnLabel   getColumnTypeName  getSchemaName  getTableName  getColumnDisplaySize  getPrecision  getScale  isAutoIncrement  isCaseSensitive  isCurrency  isDefinitelyWritable  isNullable  isReadOnly  isSearchable  isSigned  isWritable  
 VDBName          12             PartsSupplier   java.lang.String    VDBName          string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        
 SchemaName       12             PartsSupplier   java.lang.String    SchemaName       string             SYS            Tables        255                   255           0         false            true             false       true                  1           false       true          true      true        

Added: trunk/test-integration/common/src/test/resources/matviews.vdb
===================================================================
(Binary files differ)


Property changes on: trunk/test-integration/common/src/test/resources/matviews.vdb
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the teiid-commits mailing list