[teiid-commits] teiid SVN: r2441 - in trunk: engine/src/main/java/org/teiid/dqp/internal/process and 18 other directories.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Wed Aug 11 15:55:02 EDT 2010
Author: shawkins
Date: 2010-08-11 15:55:00 -0400 (Wed, 11 Aug 2010)
New Revision: 2441
Modified:
trunk/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/CacheHint.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties
trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
trunk/metadata/src/main/resources/System.vdb
trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
trunk/test-integration/common/src/test/resources/matviews.vdb
Log:
TEIID-168 updating mat logic, adding support for updatable temp tables and full table / row refreshes. fixing another issue with partial index use.
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/TupleBrowser.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -100,6 +100,12 @@
while (bound == null || bound.children != null) {
bound = tree.findChildTail(bound);
}
+ if (!direction) {
+ if (page != bound || values == null) {
+ values = bound.getValues();
+ }
+ boundIndex = values.getTuples().size() - 1;
+ }
}
if (!direction) {
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-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -34,6 +34,7 @@
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.client.RequestMessage;
import org.teiid.client.util.ResultsFuture;
import org.teiid.common.buffer.BlockedException;
@@ -136,10 +137,11 @@
* @param workItem
* @return
* @throws TeiidComponentException
+ * @throws TeiidProcessingException
*/
@SuppressWarnings("unchecked")
private TupleSource processSystemQuery(CommandContext context, Command command,
- DQPWorkContext workContext) throws TeiidComponentException {
+ DQPWorkContext workContext) throws TeiidComponentException, TeiidProcessingException {
String vdbName = workContext.getVdbName();
int vdbVersion = workContext.getVdbVersion();
VDBMetaData vdb = workContext.getVDB();
@@ -261,31 +263,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();
+ if (!table.isMaterialized()) {
+ continue;
+ }
+ String targetSchema = null;
+ String matTableName = null;
+ String state = null;
+ Timestamp updated = null;
+ Integer cardinaltity = null;
+ Boolean valid = null;
+ if (table.getMaterializedTable() == null) {
+ TempTableStore globalStore = context.getGlobalTableStore();
+ matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
+ MatTableInfo info = globalStore.getMatTableInfo(matTableName);
+ valid = info.isValid();
+ 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();
}
- rows.add(Arrays.asList(vdbName, schema.getName(), table.getName(), targetSchema, matTableName, state, updated, cardinaltity));
+ //ttl, pref_mem - not part of proper metadata
+ } 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, valid));
break;
}
}
@@ -318,10 +322,14 @@
}
break;
case GETXMLSCHEMAS:
- Object groupID = indexMetadata.getGroupID((String)((Constant)proc.getParameter(1).getExpression()).getValue());
- List<SQLXMLImpl> schemas = indexMetadata.getXMLSchemas(groupID);
- for (SQLXMLImpl schema : schemas) {
- rows.add(Arrays.asList(new XMLType(schema)));
+ try {
+ Object groupID = indexMetadata.getGroupID((String)((Constant)proc.getParameter(1).getExpression()).getValue());
+ List<SQLXMLImpl> schemas = indexMetadata.getXMLSchemas(groupID);
+ for (SQLXMLImpl schema : schemas) {
+ rows.add(Arrays.asList(new XMLType(schema)));
+ }
+ } catch (QueryMetadataException e) {
+ throw new TeiidProcessingException(e);
}
break;
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -180,11 +180,11 @@
throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
}
- public Object getGroupID(final String groupName) throws TeiidComponentException, QueryMetadataException {
+ public Table getGroupID(final String groupName) throws TeiidComponentException, QueryMetadataException {
return getMetadataStore().findGroup(groupName.toLowerCase());
}
- public Collection getGroupsForPartialName(final String partialGroupName)
+ public Collection<String> getGroupsForPartialName(final String partialGroupName)
throws TeiidComponentException, QueryMetadataException {
ArgCheck.isNotEmpty(partialGroupName);
@@ -792,7 +792,7 @@
}
if (schema == null) {
- throw new TeiidComponentException(DQPPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
+ throw new QueryMetadataException(DQPPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
}
schemas.add(schema);
}
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-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -916,7 +916,7 @@
boolean isImplicitGlobal = matMetadataId == null;
if (isImplicitGlobal) {
matTableName = MAT_PREFIX + groupName;
- matMetadataId = getGlobalTempTableMetadataId(virtualGroup, matTableName);
+ matMetadataId = getGlobalTempTableMetadataId(virtualGroup, matTableName, context, metadata, analysisRecord);
hint = ((TempMetadataID)matMetadataId).getCacheHint();
} else {
matTableName = metadata.getFullName(matMetadataId);
@@ -940,7 +940,7 @@
qnode = metadata.getVirtualPlan(metadataID);
}
- Command result = getCommand(virtualGroup, qnode, cacheString, metadata);
+ Command result = getCommand(virtualGroup, qnode, cacheString, metadata, analysisRecord);
return QueryRewriter.rewrite(result, metadata, context);
}
@@ -954,7 +954,7 @@
return query;
}
- private Object getGlobalTempTableMetadataId(GroupSymbol table, String matTableName)
+ public static Object getGlobalTempTableMetadataId(GroupSymbol table, String matTableName, CommandContext context, QueryMetadataInterface metadata, AnalysisRecord analysisRecord)
throws QueryMetadataException, TeiidComponentException, QueryResolverException, QueryValidatorException {
TempMetadataStore store = context.getGlobalTableStore().getMetadataStore();
TempMetadataID id = store.getTempGroupID(matTableName);
@@ -979,10 +979,7 @@
}
id.setPrimaryKey(primaryKey);
}
- //version column?
-
- //add timestamp?
- Command c = getCommand(table, metadata.getVirtualPlan(table.getMetadataID()), SQLConstants.Reserved.SELECT, metadata);
+ Command c = getCommand(table, metadata.getVirtualPlan(table.getMetadataID()), SQLConstants.Reserved.SELECT, metadata, analysisRecord);
CacheHint hint = c.getCacheHint();
if (hint != null) {
recordMaterializationTableAnnotation(analysisRecord, QueryPlugin.Util.getString("SimpleQueryResolver.cache_hint_used", table, matTableName, hint)); //$NON-NLS-1$
@@ -996,8 +993,8 @@
return id;
}
- private Command getCommand(GroupSymbol virtualGroup, QueryNode qnode,
- String cacheString, QueryMetadataInterface qmi) throws TeiidComponentException,
+ private static Command getCommand(GroupSymbol virtualGroup, QueryNode qnode,
+ String cacheString, QueryMetadataInterface qmi, AnalysisRecord analysisRecord) throws TeiidComponentException,
QueryMetadataException, QueryResolverException,
QueryValidatorException {
Command result = (Command)qmi.getFromMetadataCache(virtualGroup.getMetadataID(), "transformation/" + cacheString); //$NON-NLS-1$
@@ -1016,7 +1013,7 @@
//Handle bindings and references
List bindings = qnode.getBindings();
if (bindings != null){
- BindVariableVisitor.bindReferences(result, bindings, metadata);
+ BindVariableVisitor.bindReferences(result, bindings, qmi);
}
}
QueryResolver.resolveCommand(result, Collections.EMPTY_MAP, qmi, analysisRecord);
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -189,7 +189,7 @@
return hint;
}
- private static Pattern CACHE_HINT = Pattern.compile("\\s*cache(\\(\\s*(pref_mem)?\\s*(ttl:\\d{1,19})?[^)]*\\))?.*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern CACHE_HINT = Pattern.compile("\\s*cache(\\(\\s*(pref_mem)?\\s*(ttl:\\d{1,19})?\\s*(updatable)?[^)]*\\))?.*", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
void setQueryCacheOption(Token t, ParseInfo p) {
String hint = getComment(t);
@@ -204,6 +204,9 @@
if (ttl != null) {
p.cacheHint.setTtl(Long.valueOf(ttl.substring(4)));
}
+ if (match.group(4) != null) {
+ p.cacheHint.setUpdatable(true);
+ }
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -146,7 +146,7 @@
//TODO: see if there is pending work before preempting
- while(currentTime < context.getTimeSliceEnd()) {
+ while(currentTime < context.getTimeSliceEnd() || nonBlocking) {
if (requestCanceled) {
throw new TeiidProcessingException(QueryExecPlugin.Util.getString("QueryProcessor.request_cancelled", getProcessID())); //$NON-NLS-1$
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/CacheHint.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/CacheHint.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/CacheHint.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -30,9 +30,11 @@
public static final String PREF_MEM = "pref_mem"; //$NON-NLS-1$
public static final String TTL = "ttl:"; //$NON-NLS-1$
+ public static final String UPDATABLE = "updatable"; //$NON-NLS-1$
public static final String CACHE = "cache"; //$NON-NLS-1$
private boolean prefersMemory;
+ private boolean updatable;
private Long ttl;
public CacheHint() {
@@ -65,5 +67,13 @@
ssv.addCacheHint(this);
return ssv.getSQLString();
}
+
+ public boolean isUpdatable() {
+ return updatable;
+ }
+
+ public void setUpdatable(boolean updatable) {
+ this.updatable = updatable;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -1063,6 +1063,15 @@
parts.add(CacheHint.TTL);
parts.add(obj.getTtl());
}
+ if (obj.isUpdatable()) {
+ if (!addParens) {
+ parts.add(Tokens.LPAREN);
+ addParens = true;
+ } else {
+ parts.add(SPACE);
+ }
+ parts.add(CacheHint.UPDATABLE);
+ }
if (addParens) {
parts.add(Tokens.RPAREN);
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTable.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -558,6 +558,18 @@
}
}
+ List<?> updateTuple(List<?> tuple, boolean remove) throws TeiidComponentException {
+ try {
+ lock.writeLock().lock();
+ if (remove) {
+ return tree.remove(tuple);
+ }
+ return tree.insert(tuple, InsertMode.UPDATE);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ }
+
private void updateTuple(List<?> tuple) throws TeiidComponentException {
if (tree.insert(tuple, InsertMode.UPDATE) == null) {
throw new AssertionError("Update failed"); //$NON-NLS-1$
@@ -582,5 +594,9 @@
}
return this.tree.getKeyLength();
}
+
+ public boolean isUpdatable() {
+ return updatable;
+ }
}
\ No newline at end of file
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-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -29,15 +29,20 @@
import org.teiid.api.exception.query.ExpressionEvaluationException;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryProcessingException;
+import org.teiid.api.exception.query.QueryResolverException;
+import org.teiid.api.exception.query.QueryValidatorException;
import org.teiid.common.buffer.BlockedException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.TupleSource;
+import org.teiid.core.CoreConstants;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.StringUtil;
import org.teiid.language.SQLConstants.Reserved;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.eval.Evaluator;
import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.mapping.relational.QueryNode;
@@ -59,6 +64,7 @@
import org.teiid.query.sql.lang.Insert;
import org.teiid.query.sql.lang.ProcedureContainer;
import org.teiid.query.sql.lang.Query;
+import org.teiid.query.sql.lang.StoredProcedure;
import org.teiid.query.sql.lang.Update;
import org.teiid.query.sql.navigator.PostOrderNavigator;
import org.teiid.query.sql.symbol.Constant;
@@ -72,10 +78,16 @@
/**
* This proxy ProcessorDataManager is used to handle temporary tables.
+ *
+ * This isn't handled as a connector because of the temporary metadata and
+ * the create/drop handling (which doesn't have push down support)
*/
public class TempTableDataManager implements ProcessorDataManager {
- private static final String CODE_PREFIX = "#CODE_"; //$NON-NLS-1$
+ private static final String REFRESHMATVIEWROW = ".refreshmatviewrow"; //$NON-NLS-1$
+ private static final String REFRESHMATVIEW = ".refreshmatview"; //$NON-NLS-1$
+ private static final String CODE_PREFIX = "#CODE_"; //$NON-NLS-1$
+
private ProcessorDataManager processorDataManager;
private BufferManager bufferManager;
@@ -99,7 +111,7 @@
TempTableStore tempTableStore = context.getTempTableStore();
if(tempTableStore != null) {
- TupleSource result = registerRequest(context, command);
+ TupleSource result = registerRequest(context, modelName, command);
if (result != null) {
return result;
}
@@ -107,13 +119,21 @@
return this.processorDataManager.registerRequest(context, command, modelName, connectorBindingId, nodeID);
}
- public TupleSource registerRequest(CommandContext context, Command command) throws TeiidComponentException, TeiidProcessingException {
+ TupleSource registerRequest(CommandContext context, String modelName, Command command) throws TeiidComponentException, TeiidProcessingException {
TempTableStore contextStore = context.getTempTableStore();
if (command instanceof Query) {
Query query = (Query)command;
return registerQuery(context, contextStore, query);
}
if (command instanceof ProcedureContainer) {
+
+ if (command instanceof StoredProcedure && CoreConstants.SYSTEM_MODEL.equals(modelName)) {
+ TupleSource result = handleSystemProcedures(context, command);
+ if (result != null) {
+ return result;
+ }
+ }
+
GroupSymbol group = ((ProcedureContainer)command).getGroup();
if (!group.isTempGroupSymbol()) {
return null;
@@ -154,7 +174,7 @@
if (contextStore.hasTempTable(tempTableName)) {
throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableStore.table_exist_error", tempTableName));//$NON-NLS-1$
}
- contextStore.addTempTable(tempTableName, create, bufferManager);
+ contextStore.addTempTable(tempTableName, create, bufferManager, true);
return CollectionTupleSource.createUpdateCountTupleSource(0);
}
if (command instanceof Drop) {
@@ -165,6 +185,86 @@
return null;
}
+ private TupleSource handleSystemProcedures(CommandContext context, Command command)
+ throws TeiidComponentException, QueryMetadataException,
+ QueryProcessingException, QueryResolverException,
+ QueryValidatorException, TeiidProcessingException,
+ ExpressionEvaluationException {
+ QueryMetadataInterface metadata = context.getMetadata();
+ TempTableStore globalStore = context.getGlobalTableStore();
+ StoredProcedure proc = (StoredProcedure)command;
+ if (StringUtil.endsWithIgnoreCase(proc.getProcedureCallableName(), REFRESHMATVIEW)) {
+ Object groupID = validateMatView(metadata, proc);
+ String matViewName = metadata.getFullName(groupID);
+ String matTableName = RelationalPlanner.MAT_PREFIX+matViewName.toUpperCase();
+ MatTableInfo info = globalStore.getMatTableInfo(matTableName);
+ boolean invalidate = Boolean.TRUE.equals(((Constant)proc.getParameter(1).getExpression()).getValue());
+ MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null);
+ if (oldState == MatState.LOADING) {
+ return CollectionTupleSource.createUpdateCountTupleSource(-1);
+ }
+ GroupSymbol group = new GroupSymbol(matViewName);
+ group.setMetadataID(groupID);
+ Object matTableId = RelationalPlanner.getGlobalTempTableMetadataId(group, matTableName, context, metadata, AnalysisRecord.createNonRecordingRecord());
+ GroupSymbol matTable = new GroupSymbol(matTableName);
+ matTable.setMetadataID(matTableId);
+ int rowCount = loadGlobalTable(context, matTable, matTableName, globalStore, info);
+ return CollectionTupleSource.createUpdateCountTupleSource(rowCount);
+ } else if (StringUtil.endsWithIgnoreCase(proc.getProcedureCallableName(), REFRESHMATVIEWROW)) {
+ Object groupID = validateMatView(metadata, proc);
+ Object pk = metadata.getPrimaryKey(groupID);
+ String matViewName = metadata.getFullName(groupID);
+ if (pk == null) {
+ throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh_pk", matViewName)); //$NON-NLS-1$
+ }
+ List<?> ids = metadata.getElementIDsInKey(pk);
+ if (ids.size() > 1) {
+ throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh_composite", matViewName)); //$NON-NLS-1$
+ }
+ String matTableName = RelationalPlanner.MAT_PREFIX+matViewName.toUpperCase();
+ MatTableInfo info = globalStore.getMatTableInfo(matTableName);
+ if (!info.isValid()) {
+ return CollectionTupleSource.createUpdateCountTupleSource(-1);
+ }
+ TempTable tempTable = globalStore.getOrCreateTempTable(matTableName, new Query(), bufferManager, false);
+ if (!tempTable.isUpdatable()) {
+ throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh_updatable", matViewName)); //$NON-NLS-1$
+ }
+ Constant key = (Constant)proc.getParameter(2).getExpression();
+ LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh", matViewName, key)); //$NON-NLS-1$
+ String queryString = Reserved.SELECT + " * " + Reserved.FROM + ' ' + matViewName + ' ' + Reserved.WHERE + ' ' + //$NON-NLS-1$
+ metadata.getFullName(ids.iterator().next()) + '=' + key.toString() + ' ' + Reserved.OPTION + ' ' + Reserved.NOCACHE;
+ QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(queryString, matViewName.toUpperCase(), context);
+ qp.setNonBlocking(true);
+ TupleSource ts = new BatchCollector.BatchProducerTupleSource(qp);
+ tempTable = globalStore.getOrCreateTempTable(matTableName, new Query(), bufferManager, false);
+ List<?> tuple = ts.nextTuple();
+ boolean delete = false;
+ if (tuple == null) {
+ delete = true;
+ tuple = Arrays.asList(key.getValue());
+ }
+ List<?> result = tempTable.updateTuple(tuple, delete);
+ return CollectionTupleSource.createUpdateCountTupleSource(result != null ? 1 : 0);
+ }
+ return null;
+ }
+
+ private Object validateMatView(QueryMetadataInterface metadata,
+ StoredProcedure proc) throws TeiidComponentException,
+ TeiidProcessingException {
+ String name = (String)((Constant)proc.getParameter(1).getExpression()).getValue();
+ try {
+ Object groupID = metadata.getGroupID(name);
+ if (!metadata.hasMaterialization(groupID) || metadata.getMaterialization(groupID) != null) {
+ throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.not_implicit_matview", name)); //$NON-NLS-1$
+ }
+ return groupID;
+ } catch (QueryMetadataException e) {
+ throw new TeiidProcessingException(e);
+ }
+ }
+
private TupleSource registerQuery(CommandContext context,
TempTableStore contextStore, Query query)
throws TeiidComponentException, QueryMetadataException,
@@ -182,10 +282,9 @@
MatTableInfo info = globalStore.getMatTableInfo(tableName);
boolean load = info.shouldLoad();
if (load) {
- table = loadGlobalTable(context, group, tableName, globalStore, info);
- } else {
- table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
- }
+ loadGlobalTable(context, group, tableName, globalStore, info);
+ }
+ table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
} else {
table = contextStore.getOrCreateTempTable(tableName, query, bufferManager, true);
}
@@ -206,7 +305,7 @@
return table.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy());
}
- private TempTable loadGlobalTable(CommandContext context,
+ private int loadGlobalTable(CommandContext context,
GroupSymbol group, final String tableName,
TempTableStore globalStore, MatTableInfo info)
throws QueryMetadataException, TeiidComponentException,
@@ -222,7 +321,7 @@
create.getPrimaryKey().add(create.getColumns().get(metadata.getPosition(col)-1));
}
}
- TempTable table = globalStore.addTempTable(tableName, create, bufferManager);
+ TempTable table = globalStore.addTempTable(tableName, create, bufferManager, false);
table.setUpdatable(false);
CacheHint hint = table.getCacheHint();
if (hint != null) {
@@ -230,6 +329,9 @@
if (hint.getTtl() != null) {
info.setTtl(table.getCacheHint().getTtl());
}
+ if (pk != null) {
+ table.setUpdatable(hint.isUpdatable());
+ }
}
int rowCount = -1;
try {
@@ -244,15 +346,15 @@
rowCount = table.getRowCount();
} finally {
if (rowCount == -1) {
- globalStore.removeTempTableByName(tableName);
- info.setState(MatState.FAILED_LOAD);
+ info.setState(MatState.FAILED_LOAD, null);
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryExecPlugin.Util.getString("TempTableDataManager.failed_load", tableName)); //$NON-NLS-1$
} else {
- info.setState(MatState.LOADED);
+ globalStore.swapTempTable(tableName, table);
+ info.setState(MatState.LOADED, true);
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryExecPlugin.Util.getString("TempTableDataManager.loaded", tableName, rowCount)); //$NON-NLS-1$
}
}
- return table;
+ return rowCount;
}
public Object lookupCodeValue(CommandContext context, String codeTableName,
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -45,7 +45,7 @@
public class TempTableStore {
public enum MatState {
- NOT_LOADED,
+ NEEDS_LOADING,
LOADING,
FAILED_LOAD,
LOADED
@@ -53,14 +53,14 @@
public static class MatTableInfo {
private long updateTime = -1;
- private MatState state = MatState.NOT_LOADED;
+ private MatState state = MatState.NEEDS_LOADING;
private long ttl = -1;
private boolean valid;
synchronized boolean shouldLoad() throws TeiidComponentException {
for (;;) {
switch (state) {
- case NOT_LOADED:
+ case NEEDS_LOADING:
updateTime = System.currentTimeMillis();
case FAILED_LOAD:
state = MatState.LOADING;
@@ -85,10 +85,10 @@
}
}
- public synchronized MatState setState(MatState state) {
+ public synchronized MatState setState(MatState state, Boolean valid) {
MatState oldState = this.state;
- if (state == MatState.LOADED) {
- valid = true;
+ if (valid != null) {
+ this.valid = valid;
}
this.state = state;
this.updateTime = System.currentTimeMillis();
@@ -100,22 +100,18 @@
this.ttl = ttl;
}
- public long getUpdateTime() {
+ public synchronized long getUpdateTime() {
return updateTime;
}
- public MatState getState() {
+ public synchronized MatState getState() {
return state;
}
- public boolean isValid() {
+ public synchronized boolean isValid() {
return valid;
}
- public void setValid(boolean valid) {
- this.valid = valid;
- }
-
}
private ConcurrentHashMap<String, MatTableInfo> matTables = new ConcurrentHashMap<String, MatTableInfo>();
@@ -146,15 +142,14 @@
return groupToTupleSourceID.containsKey(tempTableName);
}
- TempTable addTempTable(String tempTableName, Create create, BufferManager buffer) {
+ TempTable addTempTable(String tempTableName, Create create, BufferManager buffer, boolean add) {
List<ElementSymbol> columns = create.getColumns();
- TempMetadataID existingId = tempMetadataStore.getTempGroupID(tempTableName);
- //add metadata
- TempMetadataID id = tempMetadataStore.addTempGroup(tempTableName, columns, false, true);
- if (existingId != null) {
- id.setCacheHint(existingId.getCacheHint());
+ TempMetadataID id = tempMetadataStore.getTempGroupID(tempTableName);
+ if (id == null) {
+ //add metadata
+ id = tempMetadataStore.addTempGroup(tempTableName, columns, false, true);
+ TempTableResolver.addPrimaryKey(create, id);
}
- TempTableResolver.addPrimaryKey(create, id);
columns = new ArrayList<ElementSymbol>(create.getColumns());
if (!create.getPrimaryKey().isEmpty()) {
//reorder the columns to put the key in front
@@ -163,9 +158,15 @@
columns.addAll(0, primaryKey);
}
TempTable tempTable = new TempTable(id, buffer, columns, create.getPrimaryKey().size(), sessionID);
- groupToTupleSourceID.put(tempTableName, tempTable);
+ if (add) {
+ groupToTupleSourceID.put(tempTableName, tempTable);
+ }
return tempTable;
}
+
+ void swapTempTable(String tempTableName, TempTable tempTable) {
+ groupToTupleSourceID.put(tempTableName, tempTable);
+ }
public void removeTempTableByName(String tempTableName) {
tempMetadataStore.removeTempGroup(tempTableName);
@@ -211,7 +212,7 @@
Create create = new Create();
create.setTable(new GroupSymbol(tempTableID));
create.setColumns(columns);
- return addTempTable(tempTableID, create, buffer);
+ return addTempTable(tempTableID, create, buffer, true);
}
public Set<String> getAllTempTables() {
Modified: trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties 2010-08-11 19:55:00 UTC (rev 2441)
@@ -222,6 +222,11 @@
XMLTableNode.path_error=Error evaluating XMLTable column path expression for column: {0}
XMLTableName.multi_value=Unexpected multi-valued result was returned for XMLTable column "{0}". Path expressions for non-XML type columns should return at most a single result.
-TempTableDataManager.failed_load=Failed to load MatView {0}
-TempTableDataManager.loaded=Loaded MatView {0} with row count {1}
-TempTableDataManager.loading=Loading MatView {0}
\ No newline at end of file
+TempTableDataManager.failed_load=Failed to load materialized view table {0}.
+TempTableDataManager.loaded=Loaded materialized view table {0} with row count {1}.
+TempTableDataManager.loading=Loading MatView {0}
+TempTableDataManager.not_implicit_matview={0} does not taget an internal materialized view.
+TempTableDataManager.row_refresh_pk=Materialized view {0} cannot have a row refreshed since there is no primary key.
+TempTableDataManager.row_refresh_composite=Materialized view {0} cannot have a row refreshed because it uses a composite key.
+TempTableDataManager.row_refresh_updatable=Materialized view {0} cannot have a row refreshed because it's cache hint did not specify \"updatable\".
+TempTableDataManager.row_refresh=Refreshing row {1} for materialized view {0}.
\ No newline at end of file
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -38,7 +38,7 @@
import org.teiid.query.unittest.FakeMetadataFactory;
import org.teiid.query.util.CommandContext;
- at SuppressWarnings("nls")
+ at SuppressWarnings({"nls", "unchecked"})
public class TestTempTables {
private TempMetadataAdapter metadata;
@@ -213,15 +213,36 @@
}
@Test public void testCompositeKeyPartial() throws Exception {
+ sampleTable();
+ execute("select * from x where e1 = 'b'", new List[] {Arrays.asList("b", 2), Arrays.asList("b", 3)}); //$NON-NLS-1$
+ }
+
+ @Test public void testCompositeKeyPartial1() throws Exception {
+ sampleTable();
+ execute("select * from x where e1 < 'c'", new List[] {Arrays.asList("a", 1), Arrays.asList("b", 2), Arrays.asList("b", 3)}); //$NON-NLS-1$
+ }
+
+ @Test public void testCompositeKeyPartial2() throws Exception {
+ sampleTable();
+ execute("select * from x where e2 = 1", new List[] {Arrays.asList("a", 1), Arrays.asList("c", 1)}); //$NON-NLS-1$
+ }
+
+ @Test public void testCompositeKeyPartial3() throws Exception {
+ sampleTable();
+ execute("select * from x where e1 >= 'b'", new List[] {Arrays.asList("b", 2), Arrays.asList("b", 3), Arrays.asList("c", 1)}); //$NON-NLS-1$
+ }
+
+ @Test public void testCompositeKeyPartial4() throws Exception {
+ sampleTable();
+ execute("select * from x where e1 >= 'b' order by e1 desc, e2 desc", new List[] {Arrays.asList("c", 1), Arrays.asList("b", 3), Arrays.asList("b", 2)}); //$NON-NLS-1$
+ }
+
+ private void sampleTable() throws Exception {
execute("create local temporary table x (e1 string, e2 integer, primary key (e1, e2))", new List[] {Arrays.asList(0)}); //$NON-NLS-1$
execute("insert into x (e2, e1) values (3, 'b')", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
execute("insert into x (e2, e1) values (2, 'b')", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
execute("insert into x (e2, e1) values (1, 'c')", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
execute("insert into x (e2, e1) values (1, 'a')", new List[] {Arrays.asList(1)}); //$NON-NLS-1$
- execute("select * from x where e1 = 'b'", new List[] {Arrays.asList("b", 2), Arrays.asList("b", 3)}); //$NON-NLS-1$
- execute("select * from x where e1 < 'c'", new List[] {Arrays.asList("a", 1), Arrays.asList("b", 2), Arrays.asList("b", 3)}); //$NON-NLS-1$
- execute("select * from x where e2 = 1", new List[] {Arrays.asList("a", 1), Arrays.asList("c", 1)}); //$NON-NLS-1$
- execute("select * from x where e1 >= 'b'", new List[] {Arrays.asList("b", 2), Arrays.asList("b", 3), Arrays.asList("c", 1)}); //$NON-NLS-1$
}
}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -472,7 +472,9 @@
c.setName(RecordFactory.getShortName(c.getName()));
}
indexRecord.getColumns().set(i, c);
- c.setParent(indexRecord);
+ if (columns == null) {
+ c.setParent(indexRecord);
+ }
}
}
Modified: trunk/metadata/src/main/resources/System.vdb
===================================================================
(Binary files differ)
Modified: trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -131,6 +131,10 @@
model.addSourceMapping("source", "translator", "jndi:source");
}
+ public VDBMetaData getVDB(String vdbName) {
+ return this.repo.getVDB(vdbName, 1);
+ }
+
public void undeployVDB(String vdbName) {
this.repo.removeVDB(vdbName, 1);
}
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java 2010-08-11 19:55:00 UTC (rev 2441)
@@ -31,35 +31,43 @@
import org.junit.Before;
import org.junit.Test;
+import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.jdbc.FakeServer;
+import org.teiid.jdbc.TeiidSQLException;
+import org.teiid.metadata.Table;
+import org.teiid.query.metadata.TransformationMetadata;
@SuppressWarnings("nls")
public class TestMatViews {
- private Connection conn;
+ private static final String MATVIEWS = "matviews";
+ private Connection conn;
+ private FakeServer server;
@Before public void setUp() throws Exception {
- FakeServer server = new FakeServer();
- server.deployVDB("matviews", UnitTestUtil.getTestDataPath() + "/matviews.vdb");
+ server = new FakeServer();
+ server.deployVDB(MATVIEWS, UnitTestUtil.getTestDataPath() + "/matviews.vdb");
conn = server.createConnection("jdbc:teiid:matviews");
}
- @Test public void testSystemMatViews() throws Exception {
+ @Test public void testSystemMatViewsWithImplicitLoad() 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("NEEDS_LOADING", rs.getString("loadstate"));
assertEquals("#MAT_TEST.ERRORVIEW", rs.getString("targetName"));
assertTrue(rs.next());
- assertEquals("NOT_LOADED", rs.getString("state"));
+ assertEquals("NEEDS_LOADING", rs.getString("loadstate"));
assertEquals("#MAT_TEST.MATVIEW", rs.getString("targetName"));
- assertFalse(rs.next());
+ assertTrue(rs.next());
+ assertEquals(false, rs.getBoolean("valid"));
+ assertEquals("#MAT_TEST.RANDOMVIEW", rs.getString("targetName"));
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"));
+ assertEquals("LOADED", rs.getString("loadstate"));
try {
s.executeQuery("select * from ErrorView");
} catch (SQLException e) {
@@ -67,7 +75,72 @@
}
rs = s.executeQuery("select * from SYS.MatViews where name = 'ErrorView'");
assertTrue(rs.next());
- assertEquals("FAILED_LOAD", rs.getString("state"));
+ assertEquals("FAILED_LOAD", rs.getString("loadstate"));
}
+
+ @Test public void testSystemMatViewsWithExplicitRefresh() throws Exception {
+ Statement s = conn.createStatement();
+ ResultSet rs = s.executeQuery("select * from (call SYS.refreshMatView('TEST.MATVIEW', false)) p");
+ assertTrue(rs.next());
+ assertEquals(1, rs.getInt(1));
+ rs = s.executeQuery("select * from SYS.MatViews where name = 'MatView'");
+ assertTrue(rs.next());
+ assertEquals("LOADED", rs.getString("loadstate"));
+ assertEquals(true, rs.getBoolean("valid"));
+ }
+
+ @Test(expected=TeiidSQLException.class) public void testSystemMatViewsInvalidView() throws Exception {
+ Statement s = conn.createStatement();
+ s.execute("call SYS.refreshMatView('TEST.NotMat', false)");
+ }
+
+ @Test(expected=TeiidSQLException.class) public void testSystemMatViewsInvalidView1() throws Exception {
+ Statement s = conn.createStatement();
+ s.execute("call SYS.refreshMatView('foo', false)");
+ }
+
+ @Test public void testSystemMatViewsWithRowRefresh() throws Exception {
+ //TOOD: remove this. it's a workaround for TEIIDDES-549
+ VDBMetaData vdb = server.getVDB(MATVIEWS);
+ TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
+ Table t = tm.getGroupID("TEST.RANDOMVIEW");
+ t.setSelectTransformation("/*+ cache(updatable) */ " + t.getSelectTransformation());
+
+ Statement s = conn.createStatement();
+ //prior to load refresh of a single row returns -1
+ ResultSet rs = s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.RANDOMVIEW', 0)) p");
+ assertTrue(rs.next());
+ assertEquals(-1, rs.getInt(1));
+ assertFalse(rs.next());
+
+ rs = s.executeQuery("select * from (call SYS.refreshMatView('TEST.RANDOMVIEW', false)) p");
+ assertTrue(rs.next());
+ assertEquals(1, rs.getInt(1));
+ rs = s.executeQuery("select * from SYS.MatViews where name = 'RandomView'");
+ assertTrue(rs.next());
+ assertEquals("LOADED", rs.getString("loadstate"));
+ assertEquals(true, rs.getBoolean("valid"));
+ rs = s.executeQuery("select x from TEST.RANDOMVIEW");
+ assertTrue(rs.next());
+ double key = rs.getDouble(1);
+
+ rs = s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.RANDOMVIEW', "+key+")) p");
+ assertTrue(rs.next());
+ assertEquals(1, rs.getInt(1)); //1 row updated (removed)
+
+ rs = s.executeQuery("select * from TEST.RANDOMVIEW");
+ assertFalse(rs.next());
+
+ rs = s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.RANDOMVIEW', "+key+")) p");
+ assertTrue(rs.next());
+ assertEquals(0, rs.getInt(1)); //no rows updated
+ }
+
+ @Test(expected=TeiidSQLException.class) public void testSystemMatViewsWithRowRefreshNoPk() throws Exception {
+ Statement s = conn.createStatement();
+ s.executeQuery("select * from (call SYS.refreshMatView('TEST.MATVIEW', false)) p");
+ //prior to load refresh of a single row returns -1
+ s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.MATVIEW', 0)) p");
+ }
}
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -368,9 +368,10 @@
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 LoadState 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 SYS MatViews Valid -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 9 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
@@ -1065,7 +1066,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 : 1065
+Row Count : 1066
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/testGetProcedureColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -49,7 +49,13 @@
QT_Ora9DS SYS getVDBResourcePaths isBinary 3 -7 boolean 1 1 0 10 1 <null> <null> <null> <null> <null> 2 YES getVDBResourcePaths
QT_Ora9DS SYS getXMLSchemas document 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO getXMLSchemas
QT_Ora9DS SYS getXMLSchemas schema 3 2009 xml 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getXMLSchemas
-Row Count : 49
+QT_Ora9DS SYS refreshMatView ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatView
+QT_Ora9DS SYS refreshMatView Invalidate 1 -7 boolean 1 1 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatView
+QT_Ora9DS SYS refreshMatView RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatView
+QT_Ora9DS SYS refreshMatViewRow ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatViewRow
+QT_Ora9DS SYS refreshMatViewRow Key 1 2000 object 2147483647 2147483647 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatViewRow
+QT_Ora9DS SYS refreshMatViewRow RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatViewRow
+Row Count : 55
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 QT_Ora9DS java.lang.String PROCEDURE_CAT string SYS ProcedureParams 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 QT_Ora9DS java.lang.String PROCEDURE_SCHEM string SYS ProcedureParams 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -8,7 +8,9 @@
QT_Ora9DS SYS getCharacterVDBResource <null> <null> <null> <null> 2 getCharacterVDBResource
QT_Ora9DS SYS getVDBResourcePaths <null> <null> <null> <null> 2 getVDBResourcePaths
QT_Ora9DS SYS getXMLSchemas <null> <null> <null> <null> 2 getXMLSchemas
-Row Count : 8
+QT_Ora9DS SYS refreshMatView <null> <null> <null> <null> 1 refreshMatView
+QT_Ora9DS SYS refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
+Row Count : 10
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 QT_Ora9DS java.lang.String PROCEDURE_CAT string SYS Procedures 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 QT_Ora9DS java.lang.String PROCEDURE_SCHEM string SYS Procedures 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -8,7 +8,9 @@
QT_Ora9DS SYS getCharacterVDBResource <null> <null> <null> <null> 2 getCharacterVDBResource
QT_Ora9DS SYS getVDBResourcePaths <null> <null> <null> <null> 2 getVDBResourcePaths
QT_Ora9DS SYS getXMLSchemas <null> <null> <null> <null> 2 getXMLSchemas
-Row Count : 8
+QT_Ora9DS SYS refreshMatView <null> <null> <null> <null> 1 refreshMatView
+QT_Ora9DS SYS refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
+Row Count : 10
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 QT_Ora9DS java.lang.String PROCEDURE_CAT string SYS Procedures 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 QT_Ora9DS java.lang.String PROCEDURE_SCHEM string SYS Procedures 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-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -91,9 +91,10 @@
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
+-1140134170 -2028080981 LoadState 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
+1387104200 -2028080981 Valid 16 0 9 0 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
@@ -233,7 +234,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 : 233
+Row Count : 234
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_PROC.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -4,7 +4,9 @@
-11263229 getCharacterVDBResource false -957808587 2 <null> <null> <null> <null> -2075981161
-269626231 getVDBResourcePaths false 1224777906 2 <null> <null> <null> <null> -2075981161
-1846147944 getXMLSchemas false <null> 2 <null> <null> <null> <null> -2075981161
-Row Count : 4
+-1090878128 refreshMatViewRow false <null> 3 <null> <null> <null> <null> -2075981161
+-1640760725 refreshMatView false <null> 3 <null> <null> <null> <null> -2075981161
+Row Count : 6
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_proc 11 10 0 false false false false 2 true true false false
proname 12 PartsSupplier java.lang.String proname string pg_catalog pg_proc 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-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -74,9 +74,10 @@
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 LoadState 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 SYS MatViews Valid -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 9 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
@@ -233,7 +234,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 : 233
+Row Count : 234
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/testProcedureColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -8,7 +8,13 @@
PartsSupplier SYS getVDBResourcePaths isBinary 3 -7 boolean 1 1 0 10 1 <null> <null> <null> <null> <null> 2 YES getVDBResourcePaths
PartsSupplier SYS getXMLSchemas document 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO getXMLSchemas
PartsSupplier SYS getXMLSchemas schema 3 2009 xml 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getXMLSchemas
-Row Count : 8
+PartsSupplier SYS refreshMatView ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatView
+PartsSupplier SYS refreshMatView Invalidate 1 -7 boolean 1 1 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatView
+PartsSupplier SYS refreshMatView RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatView
+PartsSupplier SYS refreshMatViewRow ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatViewRow
+PartsSupplier SYS refreshMatViewRow Key 1 2000 object 2147483647 2147483647 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatViewRow
+PartsSupplier SYS refreshMatViewRow RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatViewRow
+Row Count : 14
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 PartsSupplier java.lang.String PROCEDURE_CAT string SYS ProcedureParams 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 PartsSupplier java.lang.String PROCEDURE_SCHEM string SYS ProcedureParams 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -4,7 +4,9 @@
PartsSupplier SYS getCharacterVDBResource <null> <null> <null> <null> 2 getCharacterVDBResource
PartsSupplier SYS getVDBResourcePaths <null> <null> <null> <null> 2 getVDBResourcePaths
PartsSupplier SYS getXMLSchemas <null> <null> <null> <null> 2 getXMLSchemas
-Row Count : 4
+PartsSupplier SYS refreshMatView <null> <null> <null> <null> 1 refreshMatView
+PartsSupplier SYS refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
+Row Count : 6
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 PartsSupplier java.lang.String PROCEDURE_CAT string SYS Procedures 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 PartsSupplier java.lang.String PROCEDURE_SCHEM string SYS Procedures 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-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -1,7 +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 MatViews Cardinality 8 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 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
@@ -43,6 +43,7 @@
PartsSupplier SYS KeyColumns KeyName 5 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:da4bef58-83f4-4b88-8bb0-2dc8990be539 !
<null> -211689398
PartsSupplier SYS KeyColumns KeyType 6 <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:df9e15e6-ab77-486d-bfe0-0adc378aa99d !
<null> -2096082716
PartsSupplier SYS Columns Length 9 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:b36ea0f6-cbff-4049-bc9c-8ec9928be048 !
<null> 1552424938
+PartsSupplier SYS MatViews LoadState 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 MaxRange 19 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:0b0df4a5-7de5-4315-94f7-22c84958302e !
<null> -1431993426
PartsSupplier SYS Columns MinRange 18 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:dba0f97d-fab5-45f6-a1eb-3459ab3fcc74 !
<null> 1127616920
PartsSupplier SYS Columns 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:d1f44a6d-3e39-4251-b873-1280c2b035b3 !
<null> -1412388946
@@ -122,7 +123,6 @@
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
@@ -156,6 +156,7 @@
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
PartsSupplier SYS Tables 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:58de905f-9d64-4831-a985-da6d082ff709 !
<null> 743485616
+PartsSupplier SYS MatViews Valid 9 <null> boolean 0 0 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 10 mmuuid:3b2dcae4-c996-4046-9273-2459ebb2246f !
<null> 1387104200
PartsSupplier SYS Properties Value 2 <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:c917257d-06b7-41dd-a6cb-44c0ff0f897e !
<null> 411746507
PartsSupplier SYS VirtualDatabases Version 2 <null> string 0 50 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:c876d749-a512-4810-9910-3034ca524c45 !
<null> -357731549
PartsSupplier pg_catalog pg_attrdef adnum 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuuid:520aa08f-1341-4e8e-8abd-5785128d79ab !
<null> -1546672787
@@ -233,7 +234,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 : 233
+Row Count : 234
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/testProcedureParams.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -1,14 +1,20 @@
string string string string string integer string boolean integer integer integer integer string string string integer
VDBName SchemaName ProcedureName Name DataType Position Type Optional Precision TypeLength Scale Radix NullType UID Description OID
+PartsSupplier SYS refreshMatView Invalidate boolean 2 In false 0 0 0 10 No Nulls mmuuid:0a04801b-c78e-4ccf-a273-8b6c2fbc4fec <null> 810342205
+PartsSupplier SYS refreshMatViewRow Key object 2 In false 0 0 0 10 No Nulls mmuuid:c339f41d-5927-4516-849f-b1485c18ee6b <null> 793971710
PartsSupplier SYS getVDBResourcePaths ResourcePath string 1 ResultSet false 50 50 0 10 Nullable mmuuid:ebbffdab-ac7e-41ab-974f-62785b3086f9 <null> -971169035
+PartsSupplier SYS refreshMatViewRow RowsUpdated integer 3 ReturnValue false 0 0 0 10 No Nulls mmuuid:882ac88e-8e35-4173-8961-71997ff3552a <null> -884622685
+PartsSupplier SYS refreshMatView RowsUpdated integer 3 ReturnValue false 0 0 0 10 No Nulls mmuuid:ea9da7d7-680a-41fc-8235-989e076f10a1 <null> -1999316181
PartsSupplier SYS getBinaryVDBResource VdbResource blob 1 ResultSet false 0 0 0 10 Nullable mmuuid:90d1f79d-bd98-46f4-ae8f-adacc329cf0b <null> 1280387853
PartsSupplier SYS getCharacterVDBResource VdbResource clob 1 ResultSet false 0 0 0 10 Nullable mmuuid:111f9fa8-74c9-479a-a184-8db64a1eab3c <null> 826997014
+PartsSupplier SYS refreshMatViewRow ViewName string 1 In false 0 0 0 10 No Nulls mmuuid:db4b20a0-0714-4cab-9a94-96a2171a4231 <null> 1656933595
+PartsSupplier SYS refreshMatView ViewName string 1 In false 0 0 0 10 No Nulls mmuuid:9e3b093d-616b-46a2-9789-a963354f2f4c <null> 520571853
PartsSupplier SYS getXMLSchemas document string 1 In false 0 0 0 10 No Nulls mmuuid:41f00dca-7bc1-4593-b2a7-a7d64936c2d4 <null> -1382868413
PartsSupplier SYS getVDBResourcePaths isBinary boolean 2 ResultSet false 1 1 0 10 Nullable mmuuid:e8d087da-9833-4422-a255-f0e0fea2cb61 <null> -1250184215
PartsSupplier SYS getBinaryVDBResource resourcePath string 1 In false 50 50 0 10 No Nulls mmuuid:25e5065a-454e-4a87-bf71-b6f71b98319f <null> 551829536
PartsSupplier SYS getCharacterVDBResource resourcePath string 1 In false 50 50 0 10 No Nulls mmuuid:c54e777f-3cd0-45ad-a18b-e4e93532984f <null> -565939980
PartsSupplier SYS getXMLSchemas schema xml 1 ResultSet false 0 0 0 10 Nullable mmuuid:f0cb82f2-111e-4433-ae77-59a27fa93991 <null> -6052816
-Row Count : 8
+Row Count : 14
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 ProcedureParams 255 255 0 false false false false 0 true true false false
SchemaName 12 PartsSupplier java.lang.String SchemaName string SYS ProcedureParams 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected 2010-08-11 19:05:40 UTC (rev 2440)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected 2010-08-11 19:55:00 UTC (rev 2441)
@@ -4,7 +4,9 @@
PartsSupplier SYS getCharacterVDBResource <null> true mmuuid:72464082-00fc-44f0-98b9-8c8f637c6570 <null> -11263229
PartsSupplier SYS getVDBResourcePaths <null> true mmuuid:1204d4b2-6f92-428d-bcc5-7b3a0da9a113 <null> -269626231
PartsSupplier SYS getXMLSchemas <null> true mmuuid:2d51a2a4-9966-4bd8-861d-9c0ae8e4b869 <null> -1846147944
-Row Count : 4
+PartsSupplier SYS refreshMatView <null> false mmuuid:38467814-0f73-40c0-a373-0ee4f8bda99a <null> -1640760725
+PartsSupplier SYS refreshMatViewRow <null> false mmuuid:f03ad830-a06c-4b8e-bb4e-2dd1ae59bb3f <null> -1090878128
+Row Count : 6
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 Procedures 255 255 0 false false false false 0 true true false false
SchemaName 12 PartsSupplier java.lang.String SchemaName string SYS Procedures 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/matviews.vdb
===================================================================
(Binary files differ)
More information about the teiid-commits
mailing list