Author: shawkins
Date: 2011-05-19 15:15:52 -0400 (Thu, 19 May 2011)
New Revision: 3181
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
Log:
TEIID-1593 fix for transformationmetadata hasprocedure
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java 2011-05-18
20:11:01 UTC (rev 3180)
+++
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/CompositeMetadataStore.java 2011-05-19
19:15:52 UTC (rev 3181)
@@ -137,9 +137,6 @@
}
}
}
- if (result.isEmpty()) {
- throw new
QueryMetadataException(name.substring(1)+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
return result;
}
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2011-05-18
20:11:01 UTC (rev 3180)
+++
branches/7.4.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2011-05-19
19:15:52 UTC (rev 3181)
@@ -181,7 +181,7 @@
// I N T E R F A C E M E T H O D S
//==================================================================================
- public Object getElementID(final String elementName) throws TeiidComponentException,
QueryMetadataException {
+ public Column getElementID(final String elementName) throws TeiidComponentException,
QueryMetadataException {
int columnIndex = elementName.lastIndexOf(TransformationMetadata.DELIMITER_STRING);
if (columnIndex == -1) {
throw new
QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
@@ -299,7 +299,10 @@
Collection<StoredProcedureInfo> results =
this.procedureCache.get(canonicalName);
if (results == null) {
- Collection<Procedure> procRecords =
getMetadataStore().getStoredProcedure(canonicalName);
+ Collection<Procedure> procRecords =
getMetadataStore().getStoredProcedure(canonicalName);
+ if (procRecords.isEmpty()) {
+ return null;
+ }
results = new ArrayList<StoredProcedureInfo>(procRecords.size());
for (Procedure procRecord : procRecords) {
String procedureFullName = procRecord.getFullName();
@@ -720,7 +723,7 @@
inputStream.close();
} catch(Exception e) {}
}
- return (MappingDocument)mappingDoc.clone();
+ return mappingDoc;
}
return null;
Show replies by date