Author: van.halbert
Date: 2013-01-15 11:12:41 -0500 (Tue, 15 Jan 2013)
New Revision: 4539
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/query/sql/lang/XMLTable.java
branches/7.7.x/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
Log:
TEIID-2160 backporting fix for EDS 5.3.1
Modified: branches/7.7.x/engine/src/main/java/org/teiid/query/sql/lang/XMLTable.java
===================================================================
--- branches/7.7.x/engine/src/main/java/org/teiid/query/sql/lang/XMLTable.java 2013-01-03
01:29:33 UTC (rev 4538)
+++ branches/7.7.x/engine/src/main/java/org/teiid/query/sql/lang/XMLTable.java 2013-01-15
16:12:41 UTC (rev 4539)
@@ -26,7 +26,7 @@
private XPathExpression pathExpression;
public XMLColumn(String name) {
- super(name, DataTypeManager.DefaultDataTypes.STRING);
+ super(name, DataTypeManager.DefaultDataTypes.INTEGER);
this.ordinal = true;
}
Modified:
branches/7.7.x/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java
===================================================================
---
branches/7.7.x/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java 2013-01-03
01:29:33 UTC (rev 4538)
+++
branches/7.7.x/engine/src/test/java/org/teiid/query/processor/TestSQLXMLProcessing.java 2013-01-15
16:12:41 UTC (rev 4539)
@@ -22,6 +22,7 @@
package org.teiid.query.processor;
+import static org.junit.Assert.*;
import static org.teiid.query.processor.TestProcessor.*;
import java.io.FileInputStream;
@@ -49,6 +50,7 @@
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.optimizer.capabilities.DefaultCapabilitiesFinder;
+import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.unittest.TimestampUtil;
@@ -301,6 +303,8 @@
};
process(sql, expected);
+ ProcessorPlan plan = process(sql, expected);
+ assertEquals(DataTypeManager.DefaultDataClasses.INTEGER,
((Expression)plan.getOutputElements().get(0)).getType());
}
@Test public void testXmlTableDescendantPath() throws Exception {
@@ -494,10 +498,11 @@
TimestampWithTimezone.resetCalendar(null); //$NON-NLS-1$
}
- private void process(String sql, List<?>[] expected) throws Exception {
+ private ProcessorPlan process(String sql, List<?>[] expected) throws Exception {
ProcessorPlan plan = helpGetPlan(helpParse(sql),
RealMetadataFactory.example1Cached(), new DefaultCapabilitiesFinder(),
createCommandContext());
helpProcess(plan, createCommandContext(), dataManager, expected);
+ return plan;
}
public static BlobType blobFromFile(final String file) {
Show replies by date