teiid SVN: r2341 - in trunk: jboss-integration/src/main/java/org/teiid/adminapi/jboss and 1 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2010-07-14 12:18:49 -0400 (Wed, 14 Jul 2010)
New Revision: 2341
Modified:
trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
Log:
TEIID-1142 & TEIID-1055 These changes Teiid to work in a secured server (EAP 5.1) and provide access to the profile service
Modified: trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-07-14 01:59:05 UTC (rev 2340)
+++ trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-07-14 16:18:49 UTC (rev 2341)
@@ -1,21 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <interceptor xmlns="urn:jboss:aop-beans:1.0" name="JndiAspect" class="org.jboss.aop.microcontainer.aspects.jndi.JndiIntroduction">
- <property name="env">
- <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>java.naming.factory.initial</key><value>org.jnp.interfaces.NamingContextFactory</value></entry>
- </map>
- </property>
- </interceptor>
-
- <introduction xmlns="urn:jboss:aop-beans:1.0" class="@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding">
- <interfaces>org.jboss.kernel.spi.dependency.KernelControllerContextAware</interfaces>
- </introduction>
-
- <bind xmlns="urn:jboss:aop-beans:1.0" pointcut="execution(* $instanceof{org.jboss.kernel.spi.dependency.KernelControllerContextAware}->$implements{org.jboss.kernel.spi.dependency.KernelControllerContextAware}(..))">
- <interceptor-ref name="JndiAspect"/>
- </bind>
<!-- Teiid Services -->
<bean name="SessionService" class="org.teiid.services.SessionServiceImpl">
@@ -63,7 +47,8 @@
</bean>
<bean name="RuntimeEngineDeployer" class="org.teiid.jboss.deployers.RuntimeEngineDeployer">
- <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="teiid/engine-deployer")</annotation>
+ <property name="jndiName">teiid/engine-deployer</property>
+ <property name="profileService"><inject bean="ProfileService"/></property>
<property name="jdbcSocketConfiguration"><inject bean="JdbcSocketConfiguration"/></property>
<property name="adminSocketConfiguration"><inject bean="AdminSocketConfiguration"/></property>
<property name="workManager"><inject bean="WorkManager"/></property>
Modified: trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java 2010-07-14 01:59:05 UTC (rev 2340)
+++ trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/AdminProvider.java 2010-07-14 16:18:49 UTC (rev 2341)
@@ -45,6 +45,11 @@
import org.teiid.adminapi.AdminComponentException;
public class AdminProvider {
+
+ public static Admin getLocal(final ProfileService profileService) {
+ ProfileConnection pc = new ProfileConnection(profileService);
+ return new Admin(pc.getManagementView(), pc.getDeploymentManager());
+ }
public static Admin getLocal() throws AdminComponentException {
ProfileConnection pc = new ProfileConnection();
@@ -89,9 +94,9 @@
private String password;
- public ProfileConnection() throws AdminComponentException {
- this.profileService = connect(null, null, null);
- }
+ public ProfileConnection(final ProfileService profileService) {
+ this.profileService = profileService;
+ }
public ProfileConnection(String providerURL, String user, String password) throws AdminComponentException {
this.userName = user;
@@ -113,7 +118,7 @@
// local connection
if (providerURL == null) {
InitialContext ic = new InitialContext();
- return (ProfileService)ic.lookup(PROFILE_SERVICE_JNDI_NAME);
+ return (ProfileService)ic.lookup(PROFILE_SERVICE_JNDI_NAME);
}
Properties env = new Properties();
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-07-14 01:59:05 UTC (rev 2340)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-07-14 16:18:49 UTC (rev 2341)
@@ -30,6 +30,8 @@
import java.util.Date;
import java.util.List;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.resource.spi.XATerminator;
import javax.resource.spi.work.WorkManager;
import javax.transaction.TransactionManager;
@@ -42,6 +44,8 @@
import org.jboss.managed.api.annotation.ManagementProperties;
import org.jboss.managed.api.annotation.ManagementProperty;
import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.profileservice.spi.ProfileService;
+import org.jboss.util.naming.Util;
import org.teiid.adminapi.Admin;
import org.teiid.adminapi.AdminComponentException;
import org.teiid.adminapi.AdminException;
@@ -96,6 +100,9 @@
private transient ClientServiceRegistryImpl csr = new ClientServiceRegistryImpl();
private transient VDBRepository vdbRepository;
+ private transient ProfileService profileService;
+ private transient String jndiName;
+
public RuntimeEngineDeployer() {
// TODO: this does not belong here
LogManager.setLogListener(new Log4jListener());
@@ -136,9 +143,27 @@
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("socket_not_enabled", "admin connections")); //$NON-NLS-1$ //$NON-NLS-2$
}
LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.getString("engine_started", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
+ if (jndiName != null) {
+ final InitialContext ic ;
+ try {
+ ic = new InitialContext() ;
+ Util.bind(ic, jndiName, this) ;
+ } catch (final NamingException ne) {
+ // Add jndi_failed to bundle
+ LogManager.logError(LogConstants.CTX_RUNTIME, ne, IntegrationPlugin.Util.getString("jndi_failed", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
+ }
+ }
}
public void stop() {
+ if (jndiName != null) {
+ final InitialContext ic ;
+ try {
+ ic = new InitialContext() ;
+ Util.unbind(ic, jndiName) ;
+ } catch (final NamingException ne) {
+ }
+ }
try {
this.dqpCore.stop();
@@ -164,11 +189,15 @@
this.dqpCore.start(this);
this.logon = new LogonImpl(this.sessionService, "teiid-cluster"); //$NON-NLS-1$
- try {
- this.admin = AdminProvider.getLocal();
- } catch (AdminComponentException e) {
- throw new TeiidRuntimeException(e.getCause());
- }
+ if (profileService != null) {
+ this.admin = AdminProvider.getLocal(profileService);
+ } else {
+ try {
+ this.admin = AdminProvider.getLocal();
+ } catch (AdminComponentException e) {
+ throw new TeiidRuntimeException(e.getCause());
+ }
+ }
}
/**
@@ -234,6 +263,14 @@
this.vdbRepository = repo;
}
+ public void setProfileService(final ProfileService profileService) {
+ this.profileService = profileService ;
+ }
+
+ public void setJndiName(final String jndiName) {
+ this.jndiName = jndiName ;
+ }
+
@Override
@ManagementOperation(description="Requests for perticular session", impact=Impact.ReadOnly,params={@ManagementParameter(name="sessionId",description="The session Identifier")})
public List<RequestMetadata> getRequestsForSession(String sessionId) {
15 years, 9 months
teiid SVN: r2340 - in trunk: build/kits/jboss-container and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-13 21:59:05 -0400 (Tue, 13 Jul 2010)
New Revision: 2340
Modified:
trunk/build/assembly/jboss-container/dist.xml
trunk/build/kits/jboss-container/deploy/teiid/teiid-connector-templates-jboss-beans.xml
trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/marketdata-file-ds.xml
trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
Log:
TEIID-1143 removing version numbers from connector rars and updating the status checker to consider if the java context is used
Modified: trunk/build/assembly/jboss-container/dist.xml
===================================================================
--- trunk/build/assembly/jboss-container/dist.xml 2010-07-13 21:10:14 UTC (rev 2339)
+++ trunk/build/assembly/jboss-container/dist.xml 2010-07-14 01:59:05 UTC (rev 2340)
@@ -136,15 +136,40 @@
<includeSubModules>true</includeSubModules>
<includes>
+ <include>org.jboss.teiid.connectors:connector-file:rar</include>
+ <include>org.jboss.teiid.connectors:connector-ldap:rar</include>
+ <include>org.jboss.teiid.connectors:connector-salesforce:rar</include>
+ <include>org.jboss.teiid.connectors:connector-ws:rar</include>
+ </includes>
+
+ <binaries>
+ <outputFileNameMapping>teiid-${module.artifactId}.rar</outputFileNameMapping>
+ <includeDependencies>true</includeDependencies>
+ <unpack>false</unpack>
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact>true</useProjectArtifact>
+ <unpack>false</unpack>
+ <useTransitiveDependencies>false</useTransitiveDependencies>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ </dependencySet>
+ </dependencySets>
+ <outputDirectory>deploy/teiid/connectors</outputDirectory>
+ <fileMode>0644</fileMode>
+ </binaries>
+
+ </moduleSet>
+
+ <!-- These are built in translators -->
+ <moduleSet>
+ <includeSubModules>true</includeSubModules>
+
+ <includes>
<include>org.jboss.teiid.connectors:translator-jdbc</include>
<include>org.jboss.teiid.connectors:translator-loopback</include>
<include>org.jboss.teiid.connectors:translator-file</include>
- <include>org.jboss.teiid.connectors:connector-file:rar</include>
<include>org.jboss.teiid.connectors:translator-ldap</include>
- <include>org.jboss.teiid.connectors:connector-ldap:rar</include>
<include>org.jboss.teiid.connectors:translator-salesforce</include>
- <include>org.jboss.teiid.connectors:connector-salesforce:rar</include>
- <include>org.jboss.teiid.connectors:connector-ws:rar</include>
<include>org.jboss.teiid.connectors:translator-ws</include>
</includes>
Modified: trunk/build/kits/jboss-container/deploy/teiid/teiid-connector-templates-jboss-beans.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/teiid-connector-templates-jboss-beans.xml 2010-07-13 21:10:14 UTC (rev 2339)
+++ trunk/build/kits/jboss-container/deploy/teiid/teiid-connector-templates-jboss-beans.xml 2010-07-14 01:59:05 UTC (rev 2340)
@@ -41,7 +41,7 @@
<parameter class="java.lang.String">connector-ldap</parameter>
<parameter class="java.lang.String">LDAP Connection</parameter>
</constructor>
- <property name="rarName">connector-ldap-${project.version}.rar</property>
+ <property name="rarName">teiid-connector-ldap.rar</property>
</bean>
<bean name="connector-salesforce-${project.version}" class="org.teiid.templates.connector.ConnectorDeploymentTemplate">
@@ -56,7 +56,7 @@
<parameter class="java.lang.String">connector-salesforce</parameter>
<parameter class="java.lang.String">Salesforce Connection</parameter>
</constructor>
- <property name="rarName">connector-salesforce-${project.version}.rar</property>
+ <property name="rarName">teiid-connector-salesforce.rar</property>
</bean>
<bean name="connector-file-${project.version}" class="org.teiid.templates.connector.ConnectorDeploymentTemplate">
@@ -71,7 +71,7 @@
<parameter class="java.lang.String">connector-file</parameter>
<parameter class="java.lang.String">File Connection</parameter>
</constructor>
- <property name="rarName">connector-file-${project.version}.rar</property>
+ <property name="rarName">teiid-connector-file.rar</property>
</bean>
<bean name="connector-ws-${project.version}" class="org.teiid.templates.connector.ConnectorDeploymentTemplate">
@@ -86,7 +86,7 @@
<parameter class="java.lang.String">connector-ws</parameter>
<parameter class="java.lang.String">WS Connection</parameter>
</constructor>
- <property name="rarName">connector-ws-${project.version}.rar</property>
+ <property name="rarName">teiid-connector-ws.rar</property>
</bean>
</deployment>
Modified: trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/marketdata-file-ds.xml
===================================================================
--- trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/marketdata-file-ds.xml 2010-07-13 21:10:14 UTC (rev 2339)
+++ trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-portfolio/marketdata-file-ds.xml 2010-07-14 01:59:05 UTC (rev 2340)
@@ -4,7 +4,7 @@
<no-tx-connection-factory>
<jndi-name>marketdata-file</jndi-name>
- <rar-name>connector-file-${project.version}.rar</rar-name>
+ <rar-name>teiid-connector-file.rar</rar-name>
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
<!--
All the available properties for this connector are defined inside the "ra.xml" defined inside the rar
Modified: trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml
===================================================================
--- trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml 2010-07-13 21:10:14 UTC (rev 2339)
+++ trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/weather-ds.xml 2010-07-14 01:59:05 UTC (rev 2340)
@@ -4,7 +4,7 @@
<no-tx-connection-factory>
<jndi-name>WeatherDS</jndi-name>
- <rar-name>connector-ws-${project.version}.rar</rar-name>
+ <rar-name>teiid-connector-ws.rar</rar-name>
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
<config-property name="EndPoint">http://www.weather.gov/forecasts/xml/sample_products/browser_interface/nd...</config-property>
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-13 21:10:14 UTC (rev 2339)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-14 01:59:05 UTC (rev 2340)
@@ -66,6 +66,10 @@
<h2><a name="Configuration">Configuration Issues</a></h2>
See the See the <a href="teiid-docs/teiid_admin_guide.pdf">Admin Guide</a> for more on configuration and installation.
+<h4>from 7.0</h4>
+<ul>
+ <li>Rar file names no longer contain version numbers. -ds.xml files should be updated from connector-XXX-version.rar to teiid-connector-XXX.rar
+<ul>
<h4>from 6.2</h4>
<ul>
@@ -76,7 +80,7 @@
<h2><a name="Other">Other Issues</a></h2>
<ul>
- <li>For compatability with the 7.0 release if a stored procedure parameter list begins with identifier=, then it will be parsed as a named parameter invocation even if the intent was to use a comparison predicate
+ <li>For compatibility with the 7.0 release if a stored procedure parameter list begins with identifier=, then it will be parsed as a named parameter invocation even if the intent was to use a comparison predicate
as the first parameter value. The workaround is to use nesting parens, e.g. call proc((identifier=value), ...), which clarifies that this is positional value. This workaround will not be needed in later releases.
</ul>
<h4>from 7.0</h4>
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2010-07-13 21:10:14 UTC (rev 2339)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2010-07-14 01:59:05 UTC (rev 2340)
@@ -33,6 +33,7 @@
public class VDBStatusChecker {
+ private static final String JAVA_CONTEXT = "java:"; //$NON-NLS-1$
private VDBRepository vdbRepository;
private ConnectorManagerRepository connectorManagerRepository;
@@ -45,10 +46,16 @@
}
public void dataSourceAdded(String dataSourceName) {
+ if (dataSourceName.startsWith(JAVA_CONTEXT)) {
+ dataSourceName = dataSourceName.substring(5);
+ }
resourceAdded(dataSourceName, false);
}
public void dataSourceRemoved(String dataSourceName) {
+ if (dataSourceName.startsWith(JAVA_CONTEXT)) {
+ dataSourceName = dataSourceName.substring(5);
+ }
resourceremoved(dataSourceName, false);
}
@@ -129,12 +136,19 @@
private String getSourceName(String translatorName, ModelMetaData model, boolean translator) {
for (String sourceName:model.getSourceNames()) {
- if (translator && translatorName.equals(model.getSourceTranslatorName(sourceName))) {
- return sourceName;
+ if (translator) {
+ if (translatorName.equals(model.getSourceTranslatorName(sourceName))) {
+ return sourceName;
+ }
+ } else {
+ String jndiName = model.getSourceConnectionJndiName(sourceName);
+ if (jndiName.startsWith(JAVA_CONTEXT)) {
+ jndiName = jndiName.substring(5);
+ }
+ if (translatorName.equals(jndiName)) {
+ return sourceName;
+ }
}
- else if (translatorName.equals(model.getSourceConnectionJndiName(sourceName))) {
- return sourceName;
- }
}
return null;
}
15 years, 9 months
teiid SVN: r2339 - in trunk: engine/src/main/java/org/teiid/dqp/internal/process and 7 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-13 17:10:14 -0400 (Tue, 13 Jul 2010)
New Revision: 2339
Modified:
trunk/build/kits/jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
trunk/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestParams.java
trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
Log:
TEIID-1149 fix to ensure system datatypes are used and to not omit columns without a datatype.
Modified: trunk/build/kits/jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml
===================================================================
--- trunk/build/kits/jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/build/kits/jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml 2010-07-13 21:10:14 UTC (rev 2339)
@@ -11,6 +11,7 @@
<bean name="JBossLifeCycleListener" class="org.teiid.jboss.JBossLifeCycleListener"/>
<bean name="VDBParserDeployer" class="org.teiid.deployers.VDBParserDeployer">
+ <property name="vdbRepository"><inject bean="VDBRepository"/></property>
<property name="objectSerializer"><inject bean="ObjectSerializer"/></property>
<property name="managedObjectFactory"><inject bean="ManagedObjectFactory"/></property>
</bean>
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-07-13 18:07:49 UTC (rev 2338)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -186,12 +186,14 @@
for (Schema schema : getVisibleSchemas(vdb, metadata)) {
for (Procedure proc : schema.getProcedures().values()) {
for (ProcedureParameter param : proc.getParameters()) {
- rows.add(Arrays.asList(vdbName, proc.getParent().getName(), proc.getName(), param.getName(), param.getDatatype().getRuntimeTypeName(), param.getPosition(), param.getType().toString(), param.isOptional(),
+ Datatype dt = param.getDatatype();
+ rows.add(Arrays.asList(vdbName, proc.getParent().getName(), proc.getName(), param.getName(), dt!=null?dt.getRuntimeTypeName():null, param.getPosition(), param.getType().toString(), param.isOptional(),
param.getPrecision(), param.getLength(), param.getScale(), param.getRadix(), param.getNullType().toString(), param.getUUID(), param.getAnnotation()));
}
if (proc.getResultSet() != null) {
for (Column param : proc.getResultSet().getColumns()) {
- rows.add(Arrays.asList(vdbName, proc.getParent().getName(), proc.getName(), param.getName(), param.getDatatype().getRuntimeTypeName(), param.getPosition(), "ResultSet", false, //$NON-NLS-1$
+ Datatype dt = param.getDatatype();
+ rows.add(Arrays.asList(vdbName, proc.getParent().getName(), proc.getName(), param.getName(), dt!=null?dt.getRuntimeTypeName():null, param.getPosition(), "ResultSet", false, //$NON-NLS-1$
param.getPrecision(), param.getLength(), param.getScale(), param.getRadix(), param.getNullType().toString(), param.getUUID(), param.getAnnotation()));
}
}
@@ -233,13 +235,11 @@
break;
case COLUMNS:
for (Column column : table.getColumns()) {
- if (column.getDatatype() == null) {
- continue; //some mapping classes don't set the datatype
- }
+ Datatype dt = column.getDatatype();
rows.add(Arrays.asList(vdbName, schema.getName(), table.getName(), column.getName(), column.getPosition(), column.getNameInSource(),
- column.getDatatype().getRuntimeTypeName(), column.getScale(), column.getLength(), column.isFixedLength(), column.isSelectable(), column.isUpdatable(),
+ dt!=null?dt.getRuntimeTypeName():null, column.getScale(), column.getLength(), column.isFixedLength(), column.isSelectable(), column.isUpdatable(),
column.isCaseSensitive(), column.isSigned(), column.isCurrency(), column.isAutoIncremented(), column.getNullType().toString(), column.getMinimumValue(),
- column.getMaximumValue(), column.getSearchType().toString(), column.getFormat(), column.getDefaultValue(), column.getDatatype().getJavaClassName(), column.getPrecision(),
+ column.getMaximumValue(), column.getSearchType().toString(), column.getFormat(), column.getDefaultValue(), dt!=null?dt.getJavaClassName():null, column.getPrecision(),
column.getCharOctetLength(), column.getRadix(), column.getUUID(), column.getAnnotation()));
}
break;
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -112,7 +112,7 @@
addEntriesPlusVisibilities(vdb, new VDBMetaData());
}
- public MetadataStore getMetadataStore() throws IOException {
+ public MetadataStore getMetadataStore(Collection<Datatype> systemDatatypes) throws IOException {
if (this.store == null) {
this.store = new MetadataStore();
ArrayList<Index> tmp = new ArrayList<Index>();
@@ -124,7 +124,12 @@
this.indexes = tmp.toArray(new Index[tmp.size()]);
getAnnotationCache();
getExtensionCache();
- getDatatypeCache();
+ Map<String, Datatype> datatypes = getDatatypeCache();
+ if (systemDatatypes != null) {
+ for (Datatype datatype : systemDatatypes) {
+ datatypes.put(datatype.getUUID(), datatype);
+ }
+ }
List<KeyRecord> keys = findMetadataRecords(MetadataConstants.RECORD_TYPE.PRIMARY_KEY, null, false);
for (KeyRecord keyRecord : keys) {
this.primaryKeyCache.put(keyRecord.getUUID(), keyRecord);
Modified: trunk/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java
===================================================================
--- trunk/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/metadata/src/test/java/org/teiid/metadata/index/TestMultipleModelIndexes.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -28,6 +28,7 @@
import org.junit.Test;
import org.teiid.core.util.UnitTestUtil;
+import org.teiid.metadata.Table;
import org.teiid.metadata.TransformationMetadata;
@SuppressWarnings("nls")
@@ -39,6 +40,10 @@
assertEquals(1, names.size());
names = tm.getGroupsForPartialName("PARTS");
assertEquals(1, names.size());
+
+ //ensure that datatypes are set
+ Table t = (Table)tm.getGroupID(names.iterator().next());
+ assertNotNull(t.getColumns().get(0).getDatatype());
}
}
Modified: trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
===================================================================
--- trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -49,6 +49,7 @@
public class VDBMetadataFactory {
public static LRUCache<URL, TransformationMetadata> VDB_CACHE = new LRUCache<URL, TransformationMetadata>(10);
+ private static MetadataStore system;
public static TransformationMetadata getVDBMetadata(String vdbFile) {
try {
@@ -58,10 +59,12 @@
}
}
- public static MetadataStore getSystemVDBMetadataStore() {
+ public static MetadataStore getSystem() {
try {
- IndexMetadataFactory imf = loadMetadata(Thread.currentThread().getContextClassLoader().getResource(CoreConstants.SYSTEM_VDB));
- return imf.getMetadataStore();
+ if (system == null) {
+ system = loadMetadata(Thread.currentThread().getContextClassLoader().getResource(CoreConstants.SYSTEM_VDB)).getMetadataStore(null);
+ }
+ return system;
} catch (Exception e) {
throw new TeiidRuntimeException("System VDB not found");
}
@@ -80,8 +83,8 @@
if (udfFile != null) {
methods = FunctionMetadataReader.loadFunctionMethods(udfFile.openStream());
}
- MetadataStore system = loadMetadata(Thread.currentThread().getContextClassLoader().getResource(CoreConstants.SYSTEM_VDB)).getMetadataStore();
- vdbmetadata = new TransformationMetadata(null, new CompositeMetadataStore(Arrays.asList(system, imf.getMetadataStore())), imf.getEntriesPlusVisibilities(), methods);
+
+ vdbmetadata = new TransformationMetadata(null, new CompositeMetadataStore(Arrays.asList(getSystem(), imf.getMetadataStore(getSystem().getDatatypes()))), imf.getEntriesPlusVisibilities(), methods);
VDB_CACHE.put(vdbURL, vdbmetadata);
return vdbmetadata;
} catch (URISyntaxException e) {
Modified: trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -42,11 +42,11 @@
if (url == null) {
throw new TeiidRuntimeException(RuntimeMetadataPlugin.Util.getString("system_vdb_not_found")); //$NON-NLS-1$
}
- this.vdbRepository.setSystemStore(new IndexMetadataFactory(url).getMetadataStore());
+ this.vdbRepository.setSystemStore(new IndexMetadataFactory(url).getMetadataStore(null));
} catch (URISyntaxException e) {
- throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("failed_to_deployed", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
+ throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
} catch (IOException e) {
- throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("failed_to_deployed", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
+ throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -61,6 +61,7 @@
*/
public class VDBParserDeployer extends BaseMultipleVFSParsingDeployer<VDBMetaData> implements ManagedObjectCreator {
private ObjectSerializer serializer;
+ private VDBRepository vdbRepository;
public VDBParserDeployer() {
super(VDBMetaData.class, getCustomMappings(), IndexConstants.NAME_DELIM_CHAR+IndexConstants.INDEX_EXT, IndexMetadataFactory.class, VdbConstants.MODEL_EXT, UDFMetaData.class);
@@ -146,7 +147,7 @@
MetadataStoreGroup stores = this.serializer.loadSafe(cacheFile, MetadataStoreGroup.class);
if (stores == null) {
stores = new MetadataStoreGroup();
- stores.addStore(imf.getMetadataStore());
+ stores.addStore(imf.getMetadataStore(vdbRepository.getSystemStore().getDatatypes()));
}
unit.addAttachment(MetadataStoreGroup.class, stores);
}
@@ -179,8 +180,12 @@
LogManager.logTrace(LogConstants.CTX_RUNTIME, "VDB "+unit.getRoot().getName()+" has been parsed."); //$NON-NLS-1$ //$NON-NLS-2$
return vdb;
- }
+ }
+ public void setVdbRepository(VDBRepository vdbRepository) {
+ this.vdbRepository = vdbRepository;
+ }
+
public void setObjectSerializer(ObjectSerializer serializer) {
this.serializer = serializer;
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -109,6 +109,10 @@
throw new VirtualDatabaseException(RuntimePlugin.Util.getString("VDBService.VDB_does_not_exist._2", vdbName, latestVersion)); //$NON-NLS-1$
}
+ public MetadataStore getSystemStore() {
+ return systemStore;
+ }
+
public void setSystemStore(MetadataStore store) {
this.systemStore = store;
}
Modified: trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestParams.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestParams.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestParams.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -161,8 +161,8 @@
0,
CONNECTOR_METADATA_UTILITY,
"http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#timestamp", //$NON-NLS-1$
- "http://www.w3.org/2001/XMLSchema#dateTime", //$NON-NLS-1$
- "http://www.w3.org/2001/XMLSchema#dateTime"); //$NON-NLS-1$
+ "http://www.w3.org/2001/XMLSchema#string", //$NON-NLS-1$
+ "http://www.w3.org/2001/XMLSchema#string"); //$NON-NLS-1$
checkParameter((Argument)params.get(3),
"inOptional", //$NON-NLS-1$
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-07-13 18:07:49 UTC (rev 2338)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -52,21 +52,17 @@
import org.teiid.transport.LocalServerConnection;
import org.teiid.transport.LogonImpl;
-
+@SuppressWarnings("nls")
public class FakeServer extends ClientServiceRegistryImpl {
SessionServiceImpl sessionService = new SessionServiceImpl();
LogonImpl logon;
DQPCore dqp = new DQPCore();
VDBRepository repo = new VDBRepository();
- MetadataStore systemStore;
public FakeServer() {
this.logon = new LogonImpl(sessionService, null);
-
- systemStore = VDBMetadataFactory.getSystemVDBMetadataStore();
- this.repo.setSystemStore(systemStore);
-
+ this.repo.setSystemStore(VDBMetadataFactory.getSystem());
this.sessionService.setVDBRepository(repo);
this.dqp.setBufferService(new FakeBufferService());
this.dqp.setTransactionService(new FakeTransactionService());
@@ -90,13 +86,13 @@
public void deployVDB(String vdbName, String vdbPath) throws Exception {
IndexMetadataFactory imf = VDBMetadataFactory.loadMetadata(new File(vdbPath).toURI().toURL());
- MetadataStore metadata = imf.getMetadataStore();
+ MetadataStore metadata = imf.getMetadataStore(repo.getSystemStore().getDatatypes());
VDBMetaData vdbMetaData = new VDBMetaData();
vdbMetaData.setName(vdbName);
vdbMetaData.setStatus(VDB.Status.ACTIVE);
- for (Schema schema : systemStore.getSchemas().values()) {
+ for (Schema schema : repo.getSystemStore().getSchemas().values()) {
ModelMetaData model = new ModelMetaData();
model.setName(schema.getName());
vdbMetaData.addModel(model);
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java 2010-07-13 21:10:14 UTC (rev 2339)
@@ -26,8 +26,8 @@
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.jdbc.FakeServer;
@@ -45,14 +45,14 @@
static final String VDB = "PartsSupplier";
- @Before public void setUp() throws Exception {
+ @BeforeClass public static void setUp() throws Exception {
FakeServer server = new FakeServer();
server.deployVDB(VDB, UnitTestUtil.getTestDataPath() + "/PartsSupplier.vdb");
connection = server.createConnection("jdbc:teiid:" + VDB); //$NON-NLS-1$ //$NON-NLS-2$
dbMetadata = connection.getMetaData();
}
- @After public void tearDown() throws SQLException {
+ @AfterClass public static void tearDown() throws SQLException {
connection.close();
}
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2010-07-13 18:07:49 UTC (rev 2338)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2010-07-13 21:10:14 UTC (rev 2339)
@@ -35,6 +35,7 @@
QT_Ora9DS XQTDoc BQTDocTestDocument.MappingClasses.SingleRow ShortValue 5 short 5 <null> 0 0 1 <null> <null> <null> <null> 0 14 NO <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc BQTDocTestDocument.MappingClasses.SingleRow BigIntegerValue 2 biginteger 19 <null> 0 0 1 <null> <null> <null> <null> 0 15 NO <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc BQTDocTestDocument.MappingClasses.SingleRow BigDecimalValue 2 bigdecimal 20 <null> 0 0 1 <null> <null> <null> <null> 0 16 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS XQTDoc BQTDocTestDocument.MappingClasses.SingleRow ObjectValue <null> <null> <null> <null> 0 0 1 <null> <null> <null> <null> 0 17 NO <null> <null> <null> !
<null> NO
QT_Ora9DS VQT Base.Agg1 StringNum 12 string 10 <null> 0 10 1 <null> <null> <null> <null> 10 1 NO <null> <null> <null> !
<null> NO
QT_Ora9DS VQT Base.Agg2 StringNum 12 string 10 <null> 0 10 1 <null> <null> <null> <null> 10 1 NO <null> <null> <null> !
<null> NO
QT_Ora9DS VQT Base.Agg3 count 4 integer 10 <null> 0 10 0 <null> <null> <null> <null> 1 1 YES <null> <null> <null> !
<null> NO
@@ -972,7 +973,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 : 972
+Row Count : 973
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
15 years, 9 months
teiid SVN: r2338 - in trunk: build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather and 17 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-13 14:07:49 -0400 (Tue, 13 Jul 2010)
New Revision: 2338
Added:
trunk/engine/src/main/java/org/teiid/query/sql/lang/ExpressionCriteria.java
Modified:
trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml
trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java
trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java
trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
trunk/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/Criteria.java
trunk/engine/src/main/java/org/teiid/query/sql/navigator/PreOrPostOrderNavigator.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/ExpressionMappingVisitor.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java
trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java
trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestCaseExpression.java
trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestSearchedCaseExpression.java
trunk/engine/src/test/java/org/teiid/query/sql/util/TestUpdateProcedureGenerator.java
trunk/engine/src/test/java/org/teiid/query/sql/visitor/TestSQLStringVisitor.java
Log:
TEIID-1050 TEIID-1055 adding the ability to support criteria as expressions. also adding alternative stored procedure syntax to remove its ambiguity with comparison criteria. minor tweaks to validity checks for generating update procedures and group by expressions
Modified: trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt
===================================================================
--- trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/build/kits/jboss-container/teiid-examples/dynamicvdb-ws-weather/README.txt 2010-07-13 18:07:49 UTC (rev 2338)
@@ -26,8 +26,8 @@
to HTTP, which is the proper setting for REST.
select t.* from
- (call weather.invoke(action='GET',
- endpoint=querystring('', '38.99,-77.02 39.70,-104.80 47.6,-122.30' as listLatLon,
+ (call weather.invoke(action=>'GET',
+ endpoint=>querystring('', '38.99,-77.02 39.70,-104.80 47.6,-122.30' as listLatLon,
'time-series' as product, '2004-01-01T00:00:00' as "begin",
'2013-04-20T00:00:00' as "end", 'maxt' as maxt, 'mint' as mint)
)) w,
@@ -41,10 +41,10 @@
on the datasource.
select xmlserialize(document w.result as string) from
- (call weather.invoke(action='http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonList...',
- endpoint='http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php',
- binding='SOAP11',
- request='
+ (call weather.invoke(action=>'http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonList...',
+ endpoint=>'http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php',
+ binding=>'SOAP11',
+ request=>'
<ns1:LatLonListZipCode xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-13 18:07:49 UTC (rev 2338)
@@ -26,11 +26,21 @@
</UL>
<H2><A NAME="Highlights"></A>Highlights</H2>
<UL>
- <LI><B>SQL Support</B> - added NULLS FIST/LAST handling - including pushdown support and enhanced numeric stat aggregate functions STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP. Added support for the boolean aggregate functions ANY, SOME, EVERY.
+ <LI><B>SQL Support</B>
+ <ul>
+ <li>Added NULLS FIST/LAST handling - including pushdown support.
+ <li>Added enhanced numeric stat aggregate functions STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP, with pushdown and aggregate decomposition.
+ <li>Added support for the boolean aggregate functions ANY, SOME, EVERY.
+ <li>Added support for using boolean value expression as both criteria and expressions, e.g. "... where boolean_value" or "select x = 1 as boolean_value ...".
+ <li>Changed named procedure syntax to accept param=>value, rather than param=value.
+ </ul>
<LI><B>Parallel Source Queries</B> - reestablished parallel execution of source queries within a query plan along with a prioritized work system to help prevent resource contention.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
+<ul>
+ <li>Support for named parameter syntax using param=value has been deprecated, since it is ambiguous with a comparison predicate boolean value expression. param<b>=></b>value should be used instead.
+</ul>
<h4>from 6.2</h4>
<ul>
<li>The connector API has changed substantially. Custom connectors need to be retargeted to the new Translator API. See <a href="https://jira.jboss.org/browse/TEIID-1003">TEIID-1003</a> and the <a href="teiid-docs/teiid_developers_guide.pdf">Developer's Guide</a> for more information.
@@ -65,6 +75,10 @@
</ul>
<h2><a name="Other">Other Issues</a></h2>
+<ul>
+ <li>For compatability with the 7.0 release if a stored procedure parameter list begins with identifier=, then it will be parsed as a named parameter invocation even if the intent was to use a comparison predicate
+ as the first parameter value. The workaround is to use nesting parens, e.g. call proc((identifier=value), ...), which clarifies that this is positional value. This workaround will not be needed in later releases.
+</ul>
<h4>from 7.0</h4>
<ul>
<li>Fixed xsd type handling for SQL/XML and XML document models. xsd:date, xsd:dateTime, and xsd:time types will now all be displayed using the GMT timezone (Z). SQL types, such as timestamp, used for an XMLTABLE column will now expect their values to be in the form of the corresponding xsd type.
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/grammar.xml 2010-07-13 18:07:49 UTC (rev 2338)
@@ -511,7 +511,7 @@
<row>
<entry align="right" valign="top"><para><anchor id="prod38" xreflabel="executeNamedParams"/>executeNamedParams</para></entry>
<entry align="left" valign="top"><para>::=
-( <link linkend="prod2">id</link> <EQ> <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod2">id</link> <EQ> <link linkend="prod16">expression</link> )* )</para></entry></row>
+( <link linkend="prod2">id</link> <EQ> ( <GT> )? <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod2">id</link> <EQ> ( <GT> )? <link linkend="prod16">expression</link> )* )</para></entry></row>
<row>
<entry align="right" valign="top"><para><anchor id="prod9" xreflabel="insert"/>insert</para></entry>
<entry align="left" valign="top"><para>::=
@@ -667,57 +667,53 @@
<row>
<entry align="right" valign="top"><para><anchor id="prod78" xreflabel="booleanPrimary"/>booleanPrimary</para></entry>
<entry align="left" valign="top"><para>::=
-( <link linkend="prod79">predicate</link> | ( <LPAREN> <link linkend="prod28">criteria</link> <RPAREN> ) )</para></entry></row>
+( <link linkend="prod34">translateCriteria</link> | ( <link linkend="prod79">commonValueExpression</link> ( ( <link linkend="prod80">betweenCrit</link> | <link linkend="prod81">matchCrit</link> | <link linkend="prod82">setCrit</link> | <link linkend="prod83">isNullCrit</link> | <link linkend="prod84">subqueryCompareCriteria</link> | <link linkend="prod85">compareCrit</link> ) )? ) | <link linkend="prod86">existsCriteria</link> | <link linkend="prod30">hasCriteria</link> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod79" xreflabel="predicate"/>predicate</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod87" xreflabel="operator"/>operator</para></entry>
<entry align="left" valign="top"><para>::=
-( <link linkend="prod34">translateCriteria</link> | ( <link linkend="prod80">commonValueExpression</link> ( <link linkend="prod81">betweenCrit</link> | <link linkend="prod82">matchCrit</link> | <link linkend="prod83">setCrit</link> | <link linkend="prod84">isNullCrit</link> | <link linkend="prod85">compareCrit</link> | <link linkend="prod86">subqueryCompareCriteria</link> ) ) | <link linkend="prod87">existsCriteria</link> | <link linkend="prod30">hasCriteria</link> )</para></entry></row>
-<row>
-<entry align="right" valign="top"><para><anchor id="prod88" xreflabel="operator"/>operator</para></entry>
-<entry align="left" valign="top"><para>::=
( <EQ> | <NE> | <NE2> | <LT> | <LE> | <GT> | <GE> )</para></entry></row>
<row>
<entry align="right" valign="top"><para><anchor id="prod85" xreflabel="compareCrit"/>compareCrit</para></entry>
<entry align="left" valign="top"><para>::=
-<link linkend="prod88">operator</link> <link linkend="prod80">commonValueExpression</link></para></entry></row>
+<link linkend="prod87">operator</link> <link linkend="prod79">commonValueExpression</link></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod89" xreflabel="subquery"/>subquery</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod88" xreflabel="subquery"/>subquery</para></entry>
<entry align="left" valign="top"><para>::=
<LPAREN> ( <link linkend="prod7">queryExpression</link> | <link linkend="prod8">storedProcedure</link> ) <RPAREN></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod86" xreflabel="subqueryCompareCriteria"/>subqueryCompareCriteria</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod84" xreflabel="subqueryCompareCriteria"/>subqueryCompareCriteria</para></entry>
<entry align="left" valign="top"><para>::=
-<link linkend="prod88">operator</link> ( <ANY> | <SOME> | <ALL> ) <link linkend="prod89">subquery</link></para></entry></row>
+<link linkend="prod87">operator</link> ( <ANY> | <SOME> | <ALL> ) <link linkend="prod88">subquery</link></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod82" xreflabel="matchCrit"/>matchCrit</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod81" xreflabel="matchCrit"/>matchCrit</para></entry>
<entry align="left" valign="top"><para>::=
-( <NOT> )? <LIKE> <link linkend="prod80">commonValueExpression</link> ( <ESCAPE> <link linkend="prod70">charVal</link> | ( <LBRACE> <ESCAPE> <link linkend="prod70">charVal</link> <RBRACE> ) )?</para></entry></row>
+( <NOT> )? <LIKE> <link linkend="prod79">commonValueExpression</link> ( <ESCAPE> <link linkend="prod70">charVal</link> | ( <LBRACE> <ESCAPE> <link linkend="prod70">charVal</link> <RBRACE> ) )?</para></entry></row>
<row>
<entry align="right" valign="top"><para><anchor id="prod70" xreflabel="charVal"/>charVal</para></entry>
<entry align="left" valign="top"><para>::=
<link linkend="prod1">stringVal</link></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod81" xreflabel="betweenCrit"/>betweenCrit</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod80" xreflabel="betweenCrit"/>betweenCrit</para></entry>
<entry align="left" valign="top"><para>::=
-( <NOT> )? <BETWEEN> <link linkend="prod80">commonValueExpression</link> <AND> <link linkend="prod80">commonValueExpression</link></para></entry></row>
+( <NOT> )? <BETWEEN> <link linkend="prod79">commonValueExpression</link> <AND> <link linkend="prod79">commonValueExpression</link></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod84" xreflabel="isNullCrit"/>isNullCrit</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod83" xreflabel="isNullCrit"/>isNullCrit</para></entry>
<entry align="left" valign="top"><para>::=
<IS> ( <NOT> )? <NULL></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod83" xreflabel="setCrit"/>setCrit</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod82" xreflabel="setCrit"/>setCrit</para></entry>
<entry align="left" valign="top"><para>::=
-( <NOT> )? <IN> ( ( <link linkend="prod89">subquery</link> ) | ( <LPAREN> <link linkend="prod80">commonValueExpression</link> ( <COMMA> <link linkend="prod80">commonValueExpression</link> )* <RPAREN> ) )</para></entry></row>
+( <NOT> )? <IN> ( ( <link linkend="prod88">subquery</link> ) | ( <LPAREN> <link linkend="prod79">commonValueExpression</link> ( <COMMA> <link linkend="prod79">commonValueExpression</link> )* <RPAREN> ) )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod87" xreflabel="existsCriteria"/>existsCriteria</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod86" xreflabel="existsCriteria"/>existsCriteria</para></entry>
<entry align="left" valign="top"><para>::=
-<EXISTS> <link linkend="prod89">subquery</link></para></entry></row>
+<EXISTS> <link linkend="prod88">subquery</link></para></entry></row>
<row>
<entry align="right" valign="top"><para><anchor id="prod50" xreflabel="groupBy"/>groupBy</para></entry>
<entry align="left" valign="top"><para>::=
-<GROUP> <BY> ( <link linkend="prod90">groupByItem</link> ( <COMMA> <link linkend="prod90">groupByItem</link> )* )</para></entry></row>
+<GROUP> <BY> ( <link linkend="prod89">groupByItem</link> ( <COMMA> <link linkend="prod89">groupByItem</link> )* )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod90" xreflabel="groupByItem"/>groupByItem</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod89" xreflabel="groupByItem"/>groupByItem</para></entry>
<entry align="left" valign="top"><para>::=
<link linkend="prod16">expression</link></para></entry></row>
<row>
@@ -727,13 +723,13 @@
<row>
<entry align="right" valign="top"><para><anchor id="prod43" xreflabel="orderby"/>orderby</para></entry>
<entry align="left" valign="top"><para>::=
-<ORDER> <BY> <link linkend="prod91">sortSpecification</link> ( <COMMA> <link linkend="prod91">sortSpecification</link> )*</para></entry></row>
+<ORDER> <BY> <link linkend="prod90">sortSpecification</link> ( <COMMA> <link linkend="prod90">sortSpecification</link> )*</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod91" xreflabel="sortSpecification"/>sortSpecification</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod90" xreflabel="sortSpecification"/>sortSpecification</para></entry>
<entry align="left" valign="top"><para>::=
-<link linkend="prod92">sortKey</link> ( <ASC> | <DESC> )? ( <link linkend="prod58">nonReserved</link> <link linkend="prod58">nonReserved</link> )?</para></entry></row>
+<link linkend="prod91">sortKey</link> ( <ASC> | <DESC> )? ( <link linkend="prod58">nonReserved</link> <link linkend="prod58">nonReserved</link> )?</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod92" xreflabel="sortKey"/>sortKey</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod91" xreflabel="sortKey"/>sortKey</para></entry>
<entry align="left" valign="top"><para>::=
<link linkend="prod16">expression</link></para></entry></row>
<row>
@@ -747,73 +743,73 @@
<row>
<entry align="right" valign="top"><para><anchor id="prod16" xreflabel="expression"/>expression</para></entry>
<entry align="left" valign="top"><para>::=
-<link linkend="prod80">commonValueExpression</link></para></entry></row>
+<link linkend="prod28">criteria</link></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod80" xreflabel="commonValueExpression"/>commonValueExpression</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod79" xreflabel="commonValueExpression"/>commonValueExpression</para></entry>
<entry align="left" valign="top"><para>::=
-( <link linkend="prod93">plusExpression</link> ( <CONCAT_OP> <link linkend="prod93">plusExpression</link> )* )</para></entry></row>
+( <link linkend="prod92">plusExpression</link> ( <CONCAT_OP> <link linkend="prod92">plusExpression</link> )* )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod93" xreflabel="plusExpression"/>plusExpression</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod92" xreflabel="plusExpression"/>plusExpression</para></entry>
<entry align="left" valign="top"><para>::=
-( <link linkend="prod94">timesExpression</link> ( <link linkend="prod95">plusOperator</link> <link linkend="prod94">timesExpression</link> )* )</para></entry></row>
+( <link linkend="prod93">timesExpression</link> ( <link linkend="prod94">plusOperator</link> <link linkend="prod93">timesExpression</link> )* )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod95" xreflabel="plusOperator"/>plusOperator</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod94" xreflabel="plusOperator"/>plusOperator</para></entry>
<entry align="left" valign="top"><para>::=
( <PLUS> | <MINUS> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod94" xreflabel="timesExpression"/>timesExpression</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod93" xreflabel="timesExpression"/>timesExpression</para></entry>
<entry align="left" valign="top"><para>::=
-( <link linkend="prod96">valueExpressionPrimary</link> ( <link linkend="prod97">timesOperator</link> <link linkend="prod96">valueExpressionPrimary</link> )* )</para></entry></row>
+( <link linkend="prod95">valueExpressionPrimary</link> ( <link linkend="prod96">timesOperator</link> <link linkend="prod95">valueExpressionPrimary</link> )* )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod97" xreflabel="timesOperator"/>timesOperator</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod96" xreflabel="timesOperator"/>timesOperator</para></entry>
<entry align="left" valign="top"><para>::=
( <STAR> | <SLASH> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod96" xreflabel="valueExpressionPrimary"/>valueExpressionPrimary</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod95" xreflabel="valueExpressionPrimary"/>valueExpressionPrimary</para></entry>
<entry align="left" valign="top"><para>::=
-( <QMARK> | <link linkend="prod98">literal</link> | ( <LBRACE> <link linkend="prod58">nonReserved</link> <link linkend="prod99">function</link> <RBRACE> ) | ( <link linkend="prod57">aggregateSymbol</link> ) | ( <link linkend="prod57">aggregateSymbol</link> ) | ( <link linkend="prod57">aggregateSymbol</link> ) | ( <link linkend="prod56">xmlAgg</link> ) | ( <link linkend="prod99">function</link> ) | ( <ID> ) | ( <LPAREN> <link linkend="prod16">expression</link> <RPAREN> ) | <link linkend="prod89">subquery</link> | <link linkend="prod100">searchedCaseExpression</link> | <link linkend="prod101">caseExpression</link> )</para></entry></row>
+( <QMARK> | <link linkend="prod97">literal</link> | ( <LBRACE> <link linkend="prod58">nonReserved</link> <link linkend="prod98">function</link> <RBRACE> ) | ( <link linkend="prod57">aggregateSymbol</link> ) | ( <link linkend="prod57">aggregateSymbol</link> ) | ( <link linkend="prod57">aggregateSymbol</link> ) | ( <link linkend="prod56">xmlAgg</link> ) | ( <link linkend="prod98">function</link> ) | ( <ID> ) | <link linkend="prod88">subquery</link> | ( <LPAREN> <link linkend="prod16">expression</link> <RPAREN> ) | <link linkend="prod99">searchedCaseExpression</link> | <link linkend="prod100">caseExpression</link> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod101" xreflabel="caseExpression"/>caseExpression</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod100" xreflabel="caseExpression"/>caseExpression</para></entry>
<entry align="left" valign="top"><para>::=
<CASE> <link linkend="prod16">expression</link> ( <WHEN> <link linkend="prod16">expression</link> <THEN> <link linkend="prod16">expression</link> )+ ( <ELSE> <link linkend="prod16">expression</link> )? <END></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod100" xreflabel="searchedCaseExpression"/>searchedCaseExpression</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod99" xreflabel="searchedCaseExpression"/>searchedCaseExpression</para></entry>
<entry align="left" valign="top"><para>::=
<CASE> ( <WHEN> <link linkend="prod28">criteria</link> <THEN> <link linkend="prod16">expression</link> )+ ( <ELSE> <link linkend="prod16">expression</link> )? <END></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod99" xreflabel="function"/>function</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod98" xreflabel="function"/>function</para></entry>
<entry align="left" valign="top"><para>::=
-( ( <CONVERT> <LPAREN> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod31">dataType</link> <RPAREN> ) | ( <CAST> <LPAREN> <link linkend="prod16">expression</link> <AS> <link linkend="prod31">dataType</link> <RPAREN> ) | ( <link linkend="prod58">nonReserved</link> <LPAREN> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod102">stringConstant</link> <RPAREN> ) | ( <link linkend="prod58">nonReserved</link> <LPAREN> <link linkend="prod103">intervalType</link> <COMMA> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod16">expression</link> <RPAREN> ) | <link linkend="prod104">queryString</link> | ( ( <LEFT> | <RIGHT> | <CHAR> | <USER> | <YEAR> | <MONTH> | <HOUR> | <MINUTE> | <SECOND> | <XMLCONCAT> | <XMLCOMMENT> ) <LPAREN> ( <link linkend="prod16">expression</link> !
( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( ( <INSERT> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( ( <TRANSLATE> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | <link linkend="prod105">xmlParse</link> | <link linkend="prod106">xmlElement</link> | ( <XMLPI> <LPAREN> ( <ID> <link linkend="prod107">idExpression</link> | <link linkend="prod107">idExpression</link> ) ( <COMMA> <link linkend="prod16">expression</link> )? <RPAREN> ) | <link linkend="prod108">xmlForest</link> | <link linkend="prod68">xmlSerialize</link> | <link linkend="prod72">xmlQuery</link> | ( <link linkend="prod2">id</link> <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )*!
)? <RPAREN> ) )</para></entry></row>
+( ( <CONVERT> <LPAREN> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod31">dataType</link> <RPAREN> ) | ( <CAST> <LPAREN> <link linkend="prod16">expression</link> <AS> <link linkend="prod31">dataType</link> <RPAREN> ) | ( <link linkend="prod58">nonReserved</link> <LPAREN> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod101">stringConstant</link> <RPAREN> ) | ( <link linkend="prod58">nonReserved</link> <LPAREN> <link linkend="prod102">intervalType</link> <COMMA> <link linkend="prod16">expression</link> <COMMA> <link linkend="prod16">expression</link> <RPAREN> ) | <link linkend="prod103">queryString</link> | ( ( <LEFT> | <RIGHT> | <CHAR> | <USER> | <YEAR> | <MONTH> | <HOUR> | <MINUTE> | <SECOND> | <XMLCONCAT> | <XMLCOMMENT> ) <LPAREN> ( <link linkend="prod16">expression</link> !
( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( ( <INSERT> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | ( ( <TRANSLATE> ) <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )* )? <RPAREN> ) | <link linkend="prod104">xmlParse</link> | <link linkend="prod105">xmlElement</link> | ( <XMLPI> <LPAREN> ( <ID> <link linkend="prod106">idExpression</link> | <link linkend="prod106">idExpression</link> ) ( <COMMA> <link linkend="prod16">expression</link> )? <RPAREN> ) | <link linkend="prod107">xmlForest</link> | <link linkend="prod68">xmlSerialize</link> | <link linkend="prod72">xmlQuery</link> | ( <link linkend="prod2">id</link> <LPAREN> ( <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod16">expression</link> )*!
)? <RPAREN> ) )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod102" xreflabel="stringConstant"/>stringConstant</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod101" xreflabel="stringConstant"/>stringConstant</para></entry>
<entry align="left" valign="top"><para>::=
<link linkend="prod1">stringVal</link></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod105" xreflabel="xmlParse"/>xmlParse</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod104" xreflabel="xmlParse"/>xmlParse</para></entry>
<entry align="left" valign="top"><para>::=
<XMLPARSE> <LPAREN> <link linkend="prod58">nonReserved</link> <link linkend="prod16">expression</link> ( <link linkend="prod58">nonReserved</link> )? <RPAREN></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod104" xreflabel="queryString"/>queryString</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod103" xreflabel="queryString"/>queryString</para></entry>
<entry align="left" valign="top"><para>::=
<link linkend="prod58">nonReserved</link> <LPAREN> <link linkend="prod16">expression</link> ( <COMMA> <link linkend="prod55">derivedColumn</link> )* <RPAREN></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod106" xreflabel="xmlElement"/>xmlElement</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod105" xreflabel="xmlElement"/>xmlElement</para></entry>
<entry align="left" valign="top"><para>::=
-<XMLELEMENT> <LPAREN> ( <ID> <link linkend="prod2">id</link> | <link linkend="prod2">id</link> ) ( <COMMA> <link linkend="prod73">xmlNamespaces</link> )? ( <COMMA> <link linkend="prod109">xmlAttributes</link> )? ( <COMMA> <link linkend="prod16">expression</link> )* <RPAREN></para></entry></row>
+<XMLELEMENT> <LPAREN> ( <ID> <link linkend="prod2">id</link> | <link linkend="prod2">id</link> ) ( <COMMA> <link linkend="prod73">xmlNamespaces</link> )? ( <COMMA> <link linkend="prod108">xmlAttributes</link> )? ( <COMMA> <link linkend="prod16">expression</link> )* <RPAREN></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod109" xreflabel="xmlAttributes"/>xmlAttributes</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod108" xreflabel="xmlAttributes"/>xmlAttributes</para></entry>
<entry align="left" valign="top"><para>::=
<XMLATTRIBUTES> <LPAREN> <link linkend="prod55">derivedColumn</link> ( <COMMA> <link linkend="prod55">derivedColumn</link> )* <RPAREN></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod108" xreflabel="xmlForest"/>xmlForest</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod107" xreflabel="xmlForest"/>xmlForest</para></entry>
<entry align="left" valign="top"><para>::=
<XMLFOREST> <LPAREN> ( <link linkend="prod73">xmlNamespaces</link> <COMMA> )? <link linkend="prod55">derivedColumn</link> ( <COMMA> <link linkend="prod55">derivedColumn</link> )* <RPAREN></para></entry></row>
<row>
<entry align="right" valign="top"><para><anchor id="prod73" xreflabel="xmlNamespaces"/>xmlNamespaces</para></entry>
<entry align="left" valign="top"><para>::=
-<XMLNAMESPACES> <LPAREN> <link linkend="prod110">namespaceItem</link> ( <COMMA> <link linkend="prod110">namespaceItem</link> )* <RPAREN></para></entry></row>
+<XMLNAMESPACES> <LPAREN> <link linkend="prod109">namespaceItem</link> ( <COMMA> <link linkend="prod109">namespaceItem</link> )* <RPAREN></para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod110" xreflabel="namespaceItem"/>namespaceItem</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod109" xreflabel="namespaceItem"/>namespaceItem</para></entry>
<entry align="left" valign="top"><para>::=
( <link linkend="prod1">stringVal</link> <AS> <link linkend="prod2">id</link> )</para></entry></row>
<row>
@@ -825,7 +821,7 @@
<entry align="left" valign="top"><para>::=
( <DEFAULT_KEYWORD> <link linkend="prod1">stringVal</link> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod107" xreflabel="idExpression"/>idExpression</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod106" xreflabel="idExpression"/>idExpression</para></entry>
<entry align="left" valign="top"><para>::=
<link linkend="prod2">id</link></para></entry></row>
<row>
@@ -833,11 +829,11 @@
<entry align="left" valign="top"><para>::=
( <STRING> | <VARCHAR> | <BOOLEAN> | <BYTE> | <TINYINT> | <SHORT> | <SMALLINT> | <CHAR> | <INTEGER> | <LONG> | <BIGINT> | <BIGINTEGER> | <FLOAT> | <REAL> | <DOUBLE> | <BIGDECIMAL> | <DECIMAL> | <DATE> | <TIME> | <TIMESTAMP> | <OBJECT> | <BLOB> | <CLOB> | <XML> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod103" xreflabel="intervalType"/>intervalType</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod102" xreflabel="intervalType"/>intervalType</para></entry>
<entry align="left" valign="top"><para>::=
( <link linkend="prod58">nonReserved</link> )</para></entry></row>
<row>
-<entry align="right" valign="top"><para><anchor id="prod98" xreflabel="literal"/>literal</para></entry>
+<entry align="right" valign="top"><para><anchor id="prod97" xreflabel="literal"/>literal</para></entry>
<entry align="left" valign="top"><para>::=
( <link linkend="prod1">stringVal</link> | <INTEGERVAL> | <FLOATVAL> | <FALSE> | <TRUE> | <UNKNOWN> | <NULL> | ( ( <BOOLEANTYPE> | <TIMESTAMPTYPE> | <DATETYPE> | <TIMETYPE> ) <link linkend="prod1">stringVal</link> <RBRACE> ) )</para></entry></row>
</tbody>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/sql_support.xml 2010-07-13 18:07:49 UTC (rev 2338)
@@ -311,16 +311,20 @@
<sect1 id="criteria">
<title>Criteria</title>
<itemizedlist>
- <para>Criteria are of two basic forms:
+ <para>Criteria may be:
</para>
<listitem>
<para>Predicates that evaluate to true or false
</para>
</listitem>
<listitem>
- <para>Logical criteria that combine predicates (AND, OR, NOT)
+ <para>Logical criteria that combines criteria (AND, OR, NOT)
</para>
</listitem>
+ <listitem>
+ <para>A value expression with type boolean
+ </para>
+ </listitem>
</itemizedlist>
<itemizedlist>
<para>Syntax Rules:
@@ -358,6 +362,10 @@
</para>
</listitem>
<listitem>
+ <para>expression
+ </para>
+ </listitem>
+ <listitem>
<para>Criteria may be nested using parenthesis.
</para>
</listitem>
@@ -527,7 +535,7 @@
</para>
</listitem>
<listitem>
- <para>EXECUTE proc(name1=value1,name4=param4, ...) - named parameter syntax
+ <para>EXECUTE proc(name1=>value1,name4=>param4, ...) - named parameter syntax
</para>
</listitem>
</itemizedlist>
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -449,6 +449,8 @@
return translate((SearchedCaseExpression)expr);
} else if (expr instanceof SingleElementSymbol) {
return translate((SingleElementSymbol)expr);
+ } else if (expr instanceof Criteria) {
+ return translate((Criteria)expr);
}
throw new AssertionError();
}
Modified: trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -77,6 +77,7 @@
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.lang.DependentSetCriteria;
import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.IsNullCriteria;
import org.teiid.query.sql.lang.MatchCriteria;
import org.teiid.query.sql.lang.NotCriteria;
@@ -220,6 +221,8 @@
return evaluate((SubqueryCompareCriteria)criteria, tuple);
} else if(criteria instanceof ExistsCriteria) {
return Boolean.valueOf(evaluate((ExistsCriteria)criteria, tuple));
+ } else if (criteria instanceof ExpressionCriteria) {
+ return (Boolean)evaluate(((ExpressionCriteria)criteria).getExpression(), tuple);
} else {
throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0010, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0010, criteria));
}
@@ -643,6 +646,8 @@
return getContext(ref).getVariableContext().getGlobalValue(ref.getContextSymbol());
}
return internalEvaluate(ref.getExpression(), tuple);
+ } else if(expression instanceof Criteria) {
+ return evaluate((Criteria) expression, tuple);
} else if(expression instanceof ScalarSubquery) {
return evaluate((ScalarSubquery) expression, tuple);
} else if (expression instanceof Criteria) {
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -48,6 +48,7 @@
import org.teiid.query.sql.ProcedureReservedWords;
import org.teiid.query.sql.lang.BetweenCriteria;
import org.teiid.query.sql.lang.CompareCriteria;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.GroupContext;
import org.teiid.query.sql.lang.IsNullCriteria;
import org.teiid.query.sql.lang.MatchCriteria;
@@ -362,6 +363,15 @@
handleException(new QueryResolverException(e, QueryPlugin.Util.getString("XMLQuery.resolvingError", obj))); //$NON-NLS-1$
}
}
+
+ @Override
+ public void visit(ExpressionCriteria obj) {
+ try {
+ obj.setExpression(ResolverUtil.convertExpression(obj.getExpression(), DataTypeManager.DefaultDataTypes.BOOLEAN, metadata));
+ } catch (QueryResolverException e) {
+ handleException(e);
+ }
+ }
public TeiidComponentException getComponentException() {
return this.componentException;
Modified: trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -80,6 +80,7 @@
import org.teiid.query.sql.lang.Delete;
import org.teiid.query.sql.lang.DependentSetCriteria;
import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.From;
import org.teiid.query.sql.lang.FromClause;
import org.teiid.query.sql.lang.GroupBy;
@@ -1033,6 +1034,8 @@
rewriteSubqueryContainer((SubqueryContainer)criteria, true);
} else if (criteria instanceof DependentSetCriteria) {
criteria = rewriteDependentSetCriteria((DependentSetCriteria)criteria);
+ } else if (criteria instanceof ExpressionCriteria) {
+ return new CompareCriteria(((ExpressionCriteria) criteria).getExpression(), CompareCriteria.EQ, new Constant(Boolean.TRUE));
}
return evaluateCriteria(criteria);
@@ -1921,6 +1924,8 @@
} else {
expression = rewriteExpressionDirect(((ExpressionSymbol)expression).getExpression());
}
+ } else if (expression instanceof Criteria) {
+ expression = rewriteCriteria((Criteria)expression);
} else {
rewriteExpressions(expression);
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/sql/LanguageVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -136,4 +136,5 @@
public void visit(XMLQuery obj) {}
public void visit(QueryString obj) {}
public void visit(XMLParse obj) {}
+ public void visit(ExpressionCriteria obj) {}
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/Criteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/Criteria.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/Criteria.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -29,7 +29,8 @@
import java.util.LinkedList;
import java.util.List;
-import org.teiid.query.sql.LanguageObject;
+import org.teiid.core.types.DataTypeManager;
+import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.visitor.SQLStringVisitor;
@@ -38,7 +39,7 @@
* constraints on the data values to be retrieved for each parameter in the
* select clause. <p>
*/
-public abstract class Criteria implements LanguageObject {
+public abstract class Criteria implements Expression {
/**
* Constructs a default instance of this class.
@@ -249,5 +250,15 @@
return new CompoundCriteria(!dnf?CompoundCriteria.AND:CompoundCriteria.OR, newCrits);
}
+
+ @Override
+ public Class getType() {
+ return DataTypeManager.DefaultDataClasses.BOOLEAN;
+ }
+
+ @Override
+ public boolean isResolved() {
+ return true;
+ }
} // END CLASS
Added: trunk/engine/src/main/java/org/teiid/query/sql/lang/ExpressionCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/ExpressionCriteria.java (rev 0)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/ExpressionCriteria.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -0,0 +1,70 @@
+/*
+ * 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.query.sql.lang;
+
+import org.teiid.query.sql.LanguageVisitor;
+import org.teiid.query.sql.symbol.Expression;
+
+public class ExpressionCriteria extends Criteria {
+
+ private Expression expression;
+
+ public ExpressionCriteria(Expression expression) {
+ this.expression = expression;
+ }
+
+ public Object clone() {
+ return new ExpressionCriteria((Expression) expression.clone());
+ }
+
+ @Override
+ public void acceptVisitor(LanguageVisitor visitor) {
+ visitor.visit(this);
+ }
+
+ @Override
+ public int hashCode() {
+ return expression.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!(obj instanceof ExpressionCriteria)) {
+ return false;
+ }
+ ExpressionCriteria other = (ExpressionCriteria) obj;
+ return expression.equals(other.expression);
+ }
+
+ public Expression getExpression() {
+ return expression;
+ }
+
+ public void setExpression(Expression expression) {
+ this.expression = expression;
+ }
+
+}
Property changes on: trunk/engine/src/main/java/org/teiid/query/sql/lang/ExpressionCriteria.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/engine/src/main/java/org/teiid/query/sql/navigator/PreOrPostOrderNavigator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/navigator/PreOrPostOrderNavigator.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/sql/navigator/PreOrPostOrderNavigator.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -37,6 +37,7 @@
import org.teiid.query.sql.lang.Drop;
import org.teiid.query.sql.lang.DynamicCommand;
import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.From;
import org.teiid.query.sql.lang.GroupBy;
import org.teiid.query.sql.lang.Insert;
@@ -601,6 +602,13 @@
postVisitVisitor(obj);
}
+ @Override
+ public void visit(ExpressionCriteria obj) {
+ preVisitVisitor(obj);
+ visitNode(obj.getExpression());
+ postVisitVisitor(obj);
+ }
+
public static void doVisit(LanguageObject object, LanguageVisitor visitor, boolean order) {
PreOrPostOrderNavigator nav = new PreOrPostOrderNavigator(visitor, order);
object.acceptVisitor(nav);
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/ExpressionMappingVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/ExpressionMappingVisitor.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/ExpressionMappingVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -36,6 +36,7 @@
import org.teiid.query.sql.lang.CompareCriteria;
import org.teiid.query.sql.lang.DependentSetCriteria;
import org.teiid.query.sql.lang.DynamicCommand;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.GroupBy;
import org.teiid.query.sql.lang.Insert;
import org.teiid.query.sql.lang.IsNullCriteria;
@@ -339,6 +340,11 @@
obj.setPath(replaceExpression(obj.getPath()));
}
+ @Override
+ public void visit(ExpressionCriteria obj) {
+ obj.setExpression(replaceExpression(obj.getExpression()));
+ }
+
/**
* The object is modified in place, so is not returned.
* @param obj Language object
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-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/SQLStringVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -50,6 +50,7 @@
import org.teiid.query.sql.lang.Drop;
import org.teiid.query.sql.lang.DynamicCommand;
import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.From;
import org.teiid.query.sql.lang.FromClause;
import org.teiid.query.sql.lang.GroupBy;
@@ -989,7 +990,7 @@
if (obj.displayNamedParameters()) {
parts.add(escapeSinglePart(ElementSymbol.getShortName(param.getParameterSymbol().getOutputName())));
- parts.add(" = "); //$NON-NLS-1$
+ parts.add(" => "); //$NON-NLS-1$
}
if(param.getExpression() == null) {
@@ -999,7 +1000,14 @@
parts.add("?"); //$NON-NLS-1$
}
} else {
+ boolean addParens = !obj.displayNamedParameters() && param.getExpression() instanceof CompareCriteria;
+ if (addParens) {
+ parts.add(Tokens.LPAREN);
+ }
parts.add(registerNode(param.getExpression()));
+ if (addParens) {
+ parts.add(Tokens.RPAREN);
+ }
}
if(iter.hasNext()) {
parts.add(", "); //$NON-NLS-1$
@@ -1845,6 +1853,11 @@
}
parts.add(Tokens.RPAREN);
}
+
+ @Override
+ public void visit(ExpressionCriteria obj) {
+ obj.getExpression().acceptVisitor(this);
+ }
public static String escapeSinglePart(String part) {
if(isReservedWord(part)) {
Modified: trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -33,6 +33,7 @@
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.sql.lang.*;
import org.teiid.query.sql.symbol.*;
+import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.util.ErrorMessageKeys;
@@ -144,14 +145,11 @@
if(symbol instanceof AliasSymbol) {
symbol = ((AliasSymbol)symbol).getSymbol();
}
-
- if(symbol instanceof AggregateSymbol) {
+
+ Expression ex = SymbolMap.getExpression(symbol);
+
+ if (!(ex instanceof ElementSymbol || ex instanceof Constant)) {
handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0007, symbol));
- } else if(symbol instanceof ExpressionSymbol) {
- Expression expr = ((ExpressionSymbol)symbol).getExpression();
- if(expr == null || expr instanceof Function) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0008, symbol));
- }
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -95,7 +95,6 @@
import org.teiid.query.sql.proc.IfStatement;
import org.teiid.query.sql.proc.TranslateCriteria;
import org.teiid.query.sql.proc.WhileStatement;
-import org.teiid.query.sql.symbol.AbstractCaseExpression;
import org.teiid.query.sql.symbol.AggregateSymbol;
import org.teiid.query.sql.symbol.Constant;
import org.teiid.query.sql.symbol.DerivedColumn;
@@ -197,8 +196,8 @@
if(symbol instanceof ExpressionSymbol) {
ExpressionSymbol exprSymbol = (ExpressionSymbol) symbol;
Expression expr = exprSymbol.getExpression();
- if(! (expr instanceof Function || expr instanceof AbstractCaseExpression)) {
- handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.Expr_in_GROUP_BY_must_be_elem_func_case", expr), expr); //$NON-NLS-1$
+ if (!ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(expr).isEmpty() || expr instanceof Constant || expr instanceof Reference) {
+ handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.groupby_subquery", expr), expr); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2010-07-13 18:07:49 UTC (rev 2338)
@@ -1240,7 +1240,7 @@
storedProcedure.setDisplayNamedParameters(true);
}
(name=id()
- <EQ>
+ <EQ> [<GT>]
value = expression(info)
{
parameter = new SPParameter(parameterIndex++, value);
@@ -1251,7 +1251,7 @@
}
( <COMMA>
name=id()
- <EQ>
+ <EQ> [<GT>]
value = expression(info)
{
parameter = new SPParameter(parameterIndex++, value);
@@ -2344,56 +2344,43 @@
}
}
-/**
- * <p>Parses the basic atomic criteria - either a predicate criteria or
- * a criteria wrapped in ( ).</p>
- * @return Parsed primary criteria
+/**
+ * <p>Parse a boolean primary.</p>
+ * @return criteria
* @throws ParseException if parsing failed
*/
Criteria booleanPrimary(ParseInfo info) :
{
+ Expression ex = null;
Criteria crit = null;
}
{
- ( LOOKAHEAD(predicate(info)) crit = predicate(info) |
- (<LPAREN> crit=criteria(info) <RPAREN>)
- )
-
- {
- return crit;
- }
-}
-
-/**
- * <p>Parse a predicate criteria.</p>
- * @return Parsed predicate criteria
- * @throws ParseException if parsing failed
- */
-PredicateCriteria predicate(ParseInfo info) :
-{
- PredicateCriteria pdCrit = null;
- Expression ex = null;
-}
-{
(
- LOOKAHEAD(2) pdCrit = translateCriteria(info)
+ LOOKAHEAD(2) crit = translateCriteria(info)
|
(ex = commonValueExpression(info)
- (
- LOOKAHEAD(2) pdCrit=betweenCrit(info, ex) |
- LOOKAHEAD(2) pdCrit=matchCrit(info, ex) |
- pdCrit=setCrit(info, ex) |
- pdCrit = isNullCrit(info, ex) |
- LOOKAHEAD(operator() expression(info)) pdCrit=compareCrit(info, ex) |
- pdCrit=subqueryCompareCriteria(info, ex)
- )
+ {
+ if (ex instanceof Criteria) {
+ crit = (Criteria)ex;
+ } else {
+ crit = new ExpressionCriteria(ex);
+ }
+ }
+ [(
+ LOOKAHEAD(2) crit=betweenCrit(info, ex) |
+ LOOKAHEAD(2) crit=matchCrit(info, ex) |
+ crit=setCrit(info, ex) |
+ crit=isNullCrit(info, ex) |
+ LOOKAHEAD(operator() (<ANY>|<SOME>|<ALL>) subquery(info)) crit=subqueryCompareCriteria(info, ex) |
+ crit=compareCrit(info, ex)
+ )]
)
|
- pdCrit=existsCriteria(info) |
- pdCrit = hasCriteria()
+ crit=existsCriteria(info) |
+ crit = hasCriteria()
)
{
- return pdCrit;
+ return crit;
}
}
@@ -2908,8 +2895,11 @@
Expression expression = null;
}
{
- expression = commonValueExpression(info)
+ expression = criteria(info)
{
+ if (expression instanceof ExpressionCriteria) {
+ return ((ExpressionCriteria)expression).getExpression();
+ }
return expression;
}
}
@@ -3082,15 +3072,13 @@
}
)
|
- // Grouped expression
- LOOKAHEAD(<LPAREN> expression(info))
+ LOOKAHEAD(subquery(info)) subquery = subquery(info)
+ |
( <LPAREN>
expression = expression(info)
<RPAREN>
)
|
- subquery = subquery(info)
- |
// Searched CASE expressions
LOOKAHEAD(2) expression = searchedCaseExpression(info)
|
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2010-07-13 18:07:49 UTC (rev 2338)
@@ -261,8 +261,7 @@
ERR.015.012.0004 = The query defining an updatable virtual group cannot be an UPDATE
ERR.015.012.0005 = The query defining an updatable virtual group cannot be a DELETE
ERR.015.012.0006 = The query defining an updatable virtual group should not use GROUP BY or HAVING.
-ERR.015.012.0007 = The query defining an updatable virtual group cannot use an aggregate function: {0}
-ERR.015.012.0008 = The query defining an updatable virtual group cannot use functions in its SELECT clause {0}
+ERR.015.012.0007 = The query defining an updatable virtual group cannot use a non-constant, non-column reference expressions in its SELECT clause {0}.
ERR.015.012.0009 = The query defining an updatable virtual group cannot have more than one group in its FROM clause {0}
ERR.015.012.0010 = The query defining an updatable simple virtual group should select all the required elements in its FROM clause {0}
ERR.015.012.0011 = There must be exactly one projected symbol in the subcommand of an IN clause.
@@ -863,7 +862,7 @@
SimpleQueryResolver.materialized_table_not_used=The query against {0} did not use materialization table {1} due to the use of OPTION NOCACHE.
ValidationVisitor.input_variable_data_type_not_match=The expression "{0}" assigned to input variable "{1}" is of type "{2}" which cannot be implicitly converted to the expected type "{3}".
ValidationVisitor.input_variable_can_not_in_function=Input variable "{0}" cannot be an argument of a function in the criteria.
-ValidationVisitor.Expr_in_GROUP_BY_must_be_elem_func_case=Expressions used in a GROUP BY must be elements, functions, or CASE expressions: "{0}".
+ValidationVisitor.groupby_subquery=Expressions used in a GROUP BY cannot be constant and must not contain subqueries: "{0}".
ValidationVisitor.Procedure_should_have_query=Procedure must execute at least one command to define the procedure result set.
ValidationVisitor.Procedure_has_group_self_reference=Procedure cannot have a Group reference to itself.
ExpressionEvaluator.Expected_props_for_payload_function=Unable to evaluate {0}: expected Properties for command payload but got object of type {1}
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestParser.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -50,6 +50,7 @@
import org.teiid.query.sql.lang.Drop;
import org.teiid.query.sql.lang.DynamicCommand;
import org.teiid.query.sql.lang.ExistsCriteria;
+import org.teiid.query.sql.lang.ExpressionCriteria;
import org.teiid.query.sql.lang.From;
import org.teiid.query.sql.lang.FromClause;
import org.teiid.query.sql.lang.GroupBy;
@@ -2852,8 +2853,10 @@
}
/** SELECT a or b from g */
- @Test public void testFailsOrInSelect(){
- helpException("SELECT a or b from g"); //$NON-NLS-1$
+ @Test public void testOrInSelect(){
+ Query query = new Query();
+ query.setSelect(new Select(Arrays.asList(new ExpressionSymbol("foo", new CompoundCriteria(CompoundCriteria.OR, Arrays.asList(new ExpressionCriteria(new ElementSymbol("a")), new ExpressionCriteria(new ElementSymbol("b"))))))));
+ helpTest("select a or b", "SELECT (a) OR (b)", query);
}
/** SELECT a FROM g WHERE a LIKE x*/
@@ -6405,8 +6408,8 @@
parameter.setName("param1"); //$NON-NLS-1$
parameter.setParameterType(ParameterInfo.IN);
storedQuery.setParameter(parameter);
- helpTest("Exec proc1(param1 = 'paramValue1')", "EXEC proc1(param1 = 'paramValue1')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
- helpTest("execute proc1(param1 = 'paramValue1')", "EXEC proc1(param1 = 'paramValue1')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("Exec proc1(param1 = 'paramValue1')", "EXEC proc1(param1 => 'paramValue1')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("execute proc1(param1 = 'paramValue1')", "EXEC proc1(param1 => 'paramValue1')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testCase3281NamedVariables() {
@@ -6421,19 +6424,17 @@
param2.setName("param2"); //$NON-NLS-1$
param2.setParameterType(ParameterInfo.IN);
storedQuery.setParameter(param2);
- helpTest("Exec proc1(param1 = 'paramValue1', param2 = 'paramValue2')", "EXEC proc1(param1 = 'paramValue1', param2 = 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
- helpTest("execute proc1(param1 = 'paramValue1', param2 = 'paramValue2')", "EXEC proc1(param1 = 'paramValue1', param2 = 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("Exec proc1(param1 = 'paramValue1', param2 = 'paramValue2')", "EXEC proc1(param1 => 'paramValue1', param2 => 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("execute proc1(param1 = 'paramValue1', param2 = 'paramValue2')", "EXEC proc1(param1 => 'paramValue1', param2 => 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testCase3281QuotedNamedVariableFails2() {
- try {
- QueryParser.getQueryParser().parseCommand("Exec proc1('param1' = 'paramValue1')"); //$NON-NLS-1$
- fail("Named parameter name cannot be quoted"); //$NON-NLS-1$
- }catch(QueryParserException e) {
- // this is expected.
- //e.printStackTrace();
- //assertEquals("Unable to parse named parameter name: 'param1'", e.getMessage()); //$NON-NLS-1$
- }
+ StoredProcedure storedQuery = new StoredProcedure();
+ storedQuery.setProcedureName("proc1"); //$NON-NLS-1$
+ SPParameter param1 = new SPParameter(1, new CompareCriteria(new Constant("a"), CompareCriteria.EQ, new Constant("b"))); //$NON-NLS-1$
+ param1.setParameterType(ParameterInfo.IN);
+ storedQuery.setParameter(param1);
+ helpTest("Exec proc1('a' = 'b')", "EXEC proc1(('a' = 'b'))", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
}
/** Test what happens if the name of a parameter is a reserved word. It must be quoted (double-ticks). */
@@ -6449,8 +6450,8 @@
param2.setName("in2"); //$NON-NLS-1$
param2.setParameterType(ParameterInfo.IN);
storedQuery.setParameter(param2);
- helpTest("Exec proc1(\"in\" = 'paramValue1', in2 = 'paramValue2')", "EXEC proc1(\"in\" = 'paramValue1', in2 = 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
- helpTest("execute proc1(\"in\" = 'paramValue1', in2 = 'paramValue2')", "EXEC proc1(\"in\" = 'paramValue1', in2 = 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("Exec proc1(\"in\" = 'paramValue1', in2 = 'paramValue2')", "EXEC proc1(\"in\" => 'paramValue1', in2 => 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTest("execute proc1(\"in\" = 'paramValue1', in2 = 'paramValue2')", "EXEC proc1(\"in\" => 'paramValue1', in2 => 'paramValue2')", storedQuery); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testExceptionMessageWithLocation() {
@@ -6831,5 +6832,15 @@
f.setTypeString("CLOB");
helpTestExpression("xmlserialize(x as CLOB)", "XMLSERIALIZE(x AS CLOB)", f);
}
+
+ @Test public void testExpressionCriteria() throws Exception {
+ SearchedCaseExpression sce = new SearchedCaseExpression(Arrays.asList(new ExpressionCriteria(new ElementSymbol("x"))), Arrays.asList(new ElementSymbol("y")));
+ helpTestExpression("case when x then y end", "CASE WHEN x THEN y END", sce);
+ }
+
+ @Test public void testExpressionCriteria1() throws Exception {
+ SearchedCaseExpression sce = new SearchedCaseExpression(Arrays.asList(new NotCriteria(new ExpressionCriteria(new ElementSymbol("x")))), Arrays.asList(new ElementSymbol("y")));
+ helpTestExpression("case when not x then y end", "CASE WHEN NOT (x) THEN y END", sce);
+ }
}
Modified: trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -2296,5 +2296,9 @@
QueryMetadataInterface metadata = FakeMetadataFactory.exampleBQTCached();
helpTestRewriteExpression(original, "'path?%26x=value&y=%20%26%20'", metadata);
}
+
+ @Test public void testRewriteExpressionCriteria() throws Exception {
+ helpTestRewriteCriteria("pm1.g1.e3", "pm1.g1.e3 = true");
+ }
}
Modified: trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestCaseExpression.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestCaseExpression.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestCaseExpression.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -248,22 +248,8 @@
helpTestWhenExpressions(caseExpr, 4);
helpTestThenExpressions(caseExpr, 4);
}
- try {
- caseExpr.setWhen(TestSearchedCaseExpression.getWhenCriteria(3), getThenExpressions(3));
- fail("Setting WHEN non Expression types should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // There should be no side-effects of an illegal argument
- helpTestWhenExpressions(caseExpr, 4);
- helpTestThenExpressions(caseExpr, 4);
- }
- try {
- caseExpr.setWhen(getWhenExpressions(3), TestSearchedCaseExpression.getWhenCriteria(3));
- fail("Setting THEN non Expression types should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // There should be no side-effects of an illegal argument
- helpTestWhenExpressions(caseExpr, 4);
- helpTestThenExpressions(caseExpr, 4);
- }
+ caseExpr.setWhen(TestSearchedCaseExpression.getWhenCriteria(3), getThenExpressions(3));
+ caseExpr.setWhen(getWhenExpressions(3), TestSearchedCaseExpression.getWhenCriteria(3));
ArrayList whens = new ArrayList();
whens.add(new Constant("abc")); //$NON-NLS-1$
whens.add(new Constant("xyz")); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestSearchedCaseExpression.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestSearchedCaseExpression.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/test/java/org/teiid/query/sql/symbol/TestSearchedCaseExpression.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -202,14 +202,7 @@
helpTestWhenCriteria(caseExpr, 4);
TestCaseExpression.helpTestThenExpressions(caseExpr, 4);
}
- try {
- caseExpr.setWhen(getWhenCriteria(3), getWhenCriteria(3));
- fail("Setting THEN non Expression types should have failed."); //$NON-NLS-1$
- } catch (IllegalArgumentException e) {
- // There should be no side-effects of an illegal argument
- helpTestWhenCriteria(caseExpr, 4);
- TestCaseExpression.helpTestThenExpressions(caseExpr, 4);
- }
+ caseExpr.setWhen(getWhenCriteria(3), getWhenCriteria(3));
ArrayList whens = new ArrayList();
whens.add(new CompareCriteria(new ElementSymbol("abc"), CompareCriteria.EQ, new Constant(new Integer(20000)))); //$NON-NLS-1$
whens.add(new CompareCriteria(new ElementSymbol("xyz"), CompareCriteria.EQ, new Constant(new Integer(30000)))); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/sql/util/TestUpdateProcedureGenerator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/sql/util/TestUpdateProcedureGenerator.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/test/java/org/teiid/query/sql/util/TestUpdateProcedureGenerator.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -63,6 +63,7 @@
if (expectedProc == null) {
assertNull(actualProc);
} else {
+ assertNotNull(actualProc);
assertEquals("Didn't get expected generated procedure", expectedProc, actualProc.toString()); //$NON-NLS-1$
QueryParser.getQueryParser().parseCommand(actualProc.toString());
}
Modified: trunk/engine/src/test/java/org/teiid/query/sql/visitor/TestSQLStringVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/sql/visitor/TestSQLStringVisitor.java 2010-07-13 17:56:20 UTC (rev 2337)
+++ trunk/engine/src/test/java/org/teiid/query/sql/visitor/TestSQLStringVisitor.java 2010-07-13 18:07:49 UTC (rev 2338)
@@ -1348,7 +1348,7 @@
SPParameter param = new SPParameter(1, new Reference(0));
param.setName("p1");//$NON-NLS-1$
proc.setParameter(param);
- helpTest(proc, "EXEC myproc(p1 = ?)"); //$NON-NLS-1$
+ helpTest(proc, "EXEC myproc(p1 => ?)"); //$NON-NLS-1$
}
public void testExecNamedParams() {
@@ -1361,7 +1361,7 @@
SPParameter param2 = new SPParameter(2, new Reference(0));
param2.setName("p2");//$NON-NLS-1$
proc.setParameter(param2);
- helpTest(proc, "EXEC myproc(p1 = ?, p2 = ?)"); //$NON-NLS-1$
+ helpTest(proc, "EXEC myproc(p1 => ?, p2 => ?)"); //$NON-NLS-1$
}
/**
@@ -1381,7 +1381,7 @@
SPParameter param2 = new SPParameter(2, new Reference(0));
param2.setName("in2");//$NON-NLS-1$
proc.setParameter(param2);
- helpTest(proc, "EXEC myproc(\"in\" = ?, in2 = ?)"); //$NON-NLS-1$
+ helpTest(proc, "EXEC myproc(\"in\" => ?, in2 => ?)"); //$NON-NLS-1$
}
// Test methods for Update Procedure Language Objects
@@ -1869,7 +1869,7 @@
public void testNullExpressionInNamedParameter() {
- String expected = "EXEC sp1(PARAM = sp1.PARAM)"; //$NON-NLS-1$
+ String expected = "EXEC sp1(PARAM => sp1.PARAM)"; //$NON-NLS-1$
StoredProcedure sp = new StoredProcedure();
sp.setDisplayNamedParameters(true);
15 years, 9 months
teiid SVN: r2337 - trunk/engine/src/test/java/org/teiid/common/queue.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-13 13:56:20 -0400 (Tue, 13 Jul 2010)
New Revision: 2337
Modified:
trunk/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java
Log:
TEIID-1151 fixing unit test
Modified: trunk/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java 2010-07-13 16:32:31 UTC (rev 2336)
+++ trunk/engine/src/test/java/org/teiid/common/queue/TestThreadReuseExecutor.java 2010-07-13 17:56:20 UTC (rev 2337)
@@ -146,13 +146,13 @@
public void run() {
result.add("hello"); //$NON-NLS-1$
try {
- Thread.sleep(75);
+ Thread.sleep(70);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}, 0, 30, TimeUnit.MILLISECONDS);
- Thread.sleep(140);
+ Thread.sleep(120);
future.cancel(true);
assertEquals(2, result.size());
}
@@ -201,6 +201,7 @@
return false;
}
}, 1);
+ Thread.sleep(20); //ensure a later timestamp
FutureWork<Boolean> work4 = new FutureWork<Boolean>(new Callable<Boolean>() {
public Boolean call() throws Exception {
order.add(4);
15 years, 9 months
teiid SVN: r2336 - in trunk/test-integration/db/src: main/java/org/teiid/internal and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-13 12:32:31 -0400 (Tue, 13 Jul 2010)
New Revision: 2336
Added:
trunk/test-integration/db/src/main/java/org/teiid/internal/
trunk/test-integration/db/src/main/java/org/teiid/internal/core/
trunk/test-integration/db/src/main/java/org/teiid/internal/core/xml/
Removed:
trunk/test-integration/db/src/test/java/org/teiid/internal/core/xml/
Log:
TEIID-1154 removing jdom
Copied: trunk/test-integration/db/src/main/java/org/teiid/internal/core/xml (from rev 2334, trunk/test-integration/db/src/test/java/org/teiid/internal/core/xml)
15 years, 9 months
teiid SVN: r2335 - in trunk: common-core/src/main/resources/org/teiid/core and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-13 10:17:17 -0400 (Tue, 13 Jul 2010)
New Revision: 2335
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/common-core/src/main/resources/org/teiid/core/i18n.properties
trunk/connectors/translator-ws/pom.xml
trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLProcessorEnvironment.java
Log:
TEIID-1154 removing jdom
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-13 01:29:08 UTC (rev 2334)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-13 14:17:17 UTC (rev 2335)
@@ -2,15 +2,15 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
- <TITLE>Teiid 7.0 Final Release Notes</TITLE>
+ <TITLE>Teiid ${project.version} Release Notes</TITLE>
<META NAME="CHANGEDBY" CONTENT="Steve Hawkins">
</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P><A HREF="http://www.teiid.org/"><IMG SRC="https://www.jboss.org/dms/teiid/images/teiid_banner.png" NAME="graphics1" ALT="Teiid" ALIGN=BOTTOM WIDTH=800></A>
-<H1>Teiid 7.1 Release Notes</H1>
-<P>Teiid 7.1 adds ODBC, clustering, and caching features.
+<H1>Teiid ${project.version} Release Notes</H1>
+<P>Teiid ${project.version} adds ODBC, clustering, and caching features.
<H2>Overview</H2>
<UL>
Modified: trunk/common-core/src/main/resources/org/teiid/core/i18n.properties
===================================================================
--- trunk/common-core/src/main/resources/org/teiid/core/i18n.properties 2010-07-13 01:29:08 UTC (rev 2334)
+++ trunk/common-core/src/main/resources/org/teiid/core/i18n.properties 2010-07-13 14:17:17 UTC (rev 2335)
@@ -173,59 +173,6 @@
SqlResourceBundle.unable_to_find_bundle=Unable to find SQL bundle with name {0} and language {1}
MetaMatrixRuntimeException.Caused_by=Caused by:
InterceptorStackImpl.Interceptor_array_cannot_be_empty_1=Interceptor array cannot be empty.
-JdomHelper.The_SAX_driver_class_name_may_not_be_null_1=The SAX driver class name may not be null
-JdomHelper.The_SAX_driver_class_name_may_not_be_zero-length_2=The SAX driver class name may not be zero-length
-JdomHelper.The_file_name_may_not_be_null_3=The file name may not be null
-JdomHelper.The_file_name_may_not_be_zero-length_4=The file name may not be zero-length
-JdomHelper.The_SAX_driver_class_name_may_not_be_null_5=The SAX driver class name may not be null
-JdomHelper.The_SAX_driver_class_name_may_not_be_zero-length_6=The SAX driver class name may not be zero-length
-JdomHelper.The_InputStream_may_not_be_null_7=The InputStream may not be null
-JdomHelper.The_SAX_driver_class_name_may_not_be_null_8=The SAX driver class name may not be null
-JdomHelper.The_SAX_driver_class_name_may_not_be_zero-length_9=The SAX driver class name may not be zero-length
-JdomHelper.The_InputStream_may_not_be_null_10=The InputStream may not be null
-JdomHelper.The_root_tag_name_may_not_be_null_11=The root tag name may not be null
-JdomHelper.The_root_tag_name_may_not_be_zero-length_12=The root tag name may not be zero-length
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_13=The JDOM Element reference may not be null
-JdomHelper.The_Namespace_reference_may_not_be_null_14=The Namespace reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_15=The JDOM Element reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_16=The JDOM Element reference may not be null
-JdomHelper.The_name_may_not_be_null_17=The name may not be null
-JdomHelper.The_name_may_not_be_zero-length_18=The name may not be zero-length
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_19=The JDOM Element reference may not be null
-JdomHelper.The_Namespace_may_not_be_null_20=The Namespace may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_21=The JDOM Element reference may not be null
-JdomHelper.The_name_may_not_be_null_22=The name may not be null
-JdomHelper.The_name_may_not_be_zero-length_23=The name may not be zero-length
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_24=The JDOM Element reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_25=The JDOM Element reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_26=The JDOM Element reference may not be null
-JdomHelper.The_name_may_not_be_null_27=The name may not be null
-JdomHelper.The_name_may_not_be_zero-length_28=The name may not be zero-length
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_29=The JDOM Element reference may not be null
-JdomHelper.The_name_may_not_be_null_30=The name may not be null
-JdomHelper.The_name_may_not_be_zero-length_31=The name may not be zero-length
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_32=The JDOM Element reference may not be null
-JdomHelper.The_name_may_not_be_null_33=The name may not be null
-JdomHelper.The_name_may_not_be_zero-length_34=The name may not be zero-length
-JdomHelper.The_Namespace_reference_may_not_be_null_35=The Namespace reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_36=The JDOM Element reference may not be null
-JdomHelper.The_XMLVisitor_reference_may_not_be_null_37=The XMLVisitor reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_38=The JDOM Element reference may not be null
-JdomHelper.The_XMLVisitor_reference_may_not_be_null_39=The XMLVisitor reference may not be null
-JdomHelper.The_JDOM_Element_reference_may_not_be_null_40=The JDOM Element reference may not be null
-JdomHelper.The_XMLVisitor_reference_may_not_be_null_41=The XMLVisitor reference may not be null
-JdomHelper.The_Document_reference_may_not_be_null_42=The Document reference may not be null
-JdomHelper.The_filename_may_not_be_null_43=The filename may not be null
-JdomHelper.The_filename_may_not_be_zero-length_44=The filename may not be zero-length
-JdomHelper.The_Document_reference_may_not_be_null_45=The Document reference may not be null
-JdomHelper.The_OutputStream_reference_may_not_be_null_46=The OutputStream reference may not be null
-JdomHelper.The_Document_reference_may_not_be_null_47=The Document reference may not be null
-JdomHelper.The_Writer_reference_may_not_be_null_48=The Writer reference may not be null
-JdomHelper.The_Document_reference_may_not_be_null_49=The Document reference may not be null
-JdomHelper.The_stream_reference_may_not_be_null_50=The stream reference may not be null
-JdomHelper.JDOM_Document_tree_51=JDOM Document tree
-JdomHelper.___52=\ \
-JdomHelper.___53=\ \
ServiceInvocation.Method_not_found_{0}.{1}=Method not found {0}.{1}
Command.Could_not_find_method=Could not find method ''{0}.{1}''.
Command.Argument_count_mis-match,_expected_{0}_but_received_{1}=Argument count mis-match, expected {0} but received {1}.
Modified: trunk/connectors/translator-ws/pom.xml
===================================================================
--- trunk/connectors/translator-ws/pom.xml 2010-07-13 01:29:08 UTC (rev 2334)
+++ trunk/connectors/translator-ws/pom.xml 2010-07-13 14:17:17 UTC (rev 2335)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ws</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
- <name>Web ervice Translator</name>
+ <name>Web service Translator</name>
<description>This translator provides access to Web Services.</description>
<dependencies>
<dependency>
@@ -27,11 +27,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>jdom</groupId>
- <artifactId>jdom</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<scope>provided</scope>
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLProcessorEnvironment.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLProcessorEnvironment.java 2010-07-13 01:29:08 UTC (rev 2334)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLProcessorEnvironment.java 2010-07-13 14:17:17 UTC (rev 2335)
@@ -45,9 +45,6 @@
/** XML result documents should be in String form */
public static final String STRING_RESULT = "String"; //$NON-NLS-1$
- /** XML result documents should be in JDOM document form */
- public static final String JDOM_DOCUMENT_RESULT = "JDOM Document"; //$NON-NLS-1$
-
/* Stack <ProgramState> */
private LinkedList<ProgramState> programStack = new LinkedList<ProgramState>();
15 years, 9 months
teiid SVN: r2334 - in trunk: build/kits/jboss-container and 15 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-07-12 21:29:08 -0400 (Mon, 12 Jul 2010)
New Revision: 2334
Added:
trunk/test-integration/db/src/test/java/org/teiid/internal/
trunk/test-integration/db/src/test/java/org/teiid/internal/core/
trunk/test-integration/db/src/test/java/org/teiid/internal/core/xml/
Removed:
trunk/build/kits/jboss-container/teiid-docs/licenses/JDOM-LICENSE.txt
trunk/engine/src/main/java/org/teiid/internal/core/xml/
trunk/engine/src/test/java/org/teiid/internal/core/xml/
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java
trunk/engine/pom.xml
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataReader.java
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMethod.java
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionParameter.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingLoader.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java
trunk/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java
trunk/engine/src/test/java/org/teiid/query/function/source/TestXMLSystemFunctions.java
trunk/engine/src/test/java/org/teiid/query/mapping/xml/TestMappingOutputter.java
trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
trunk/pom.xml
trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java
Log:
TEIID-1154 removing jdom and fixing an issue with function metadata
Deleted: trunk/build/kits/jboss-container/teiid-docs/licenses/JDOM-LICENSE.txt
===================================================================
--- trunk/build/kits/jboss-container/teiid-docs/licenses/JDOM-LICENSE.txt 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/build/kits/jboss-container/teiid-docs/licenses/JDOM-LICENSE.txt 2010-07-13 01:29:08 UTC (rev 2334)
@@ -1,56 +0,0 @@
-/*--
-
- $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
-
- Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions, and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions, and the disclaimer that follows
- these conditions in the documentation and/or other materials
- provided with the distribution.
-
- 3. The name "JDOM" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact <request_AT_jdom_DOT_org>.
-
- 4. Products derived from this software may not be called "JDOM", nor
- may "JDOM" appear in their name, without prior written permission
- from the JDOM Project Management <request_AT_jdom_DOT_org>.
-
- In addition, we request (but do not require) that you include in the
- end-user documentation provided with the redistribution and/or in the
- software itself an acknowledgement equivalent to the following:
- "This product includes software developed by the
- JDOM Project (http://www.jdom.org/)."
- Alternatively, the acknowledgment may be graphical using the logos
- available at http://www.jdom.org/images/logos.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the JDOM Project and was originally
- created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
- Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
- on the JDOM Project, please see <http://www.jdom.org/>.
-
- */
-
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-07-13 01:29:08 UTC (rev 2334)
@@ -27,6 +27,7 @@
<H2><A NAME="Highlights"></A>Highlights</H2>
<UL>
<LI><B>SQL Support</B> - added NULLS FIST/LAST handling - including pushdown support and enhanced numeric stat aggregate functions STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP. Added support for the boolean aggregate functions ANY, SOME, EVERY.
+ <LI><B>Parallel Source Queries</B> - reestablished parallel execution of source queries within a query plan along with a prioritized work system to help prevent resource contention.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
@@ -71,7 +72,6 @@
<h4>From 6.2</h4>
<ul>
<li>Start time is now significantly longer due to the container deployment. However many operations can be performed on configruation files that will trigger a redeployment without the need for a restart.
- <li>Parallel execution of source queries within a query plan has been temporarily disabled.
<li>Inversion of parse, format, and convert system functions is not used if it can be narrowing. In situations where a predicate has the form: parseTime(column, 'format') = {t 'time value'} may lead to reduced performance, since
the parseTime function cannot be pushed down. This should be addressed in future releases.
</ul>
@@ -99,6 +99,17 @@
<h2><a name="LibraryUpdates">Thirdparty Library Updates</a></h2>
The following components have been updated:
+<h4>From 7.0</h4>
+<ul>
+ <li>JDOM was removed.
+</ul>
+<h4>From 6.2</h4>
+<ul>
+ <li>Netty was upgraded to 3.1.5
+ <li>Saxon was upgraded to 9.1.0.8
+ <li>A 5.1 container's version of Arjuna is newer than what was previously included in Teiid 6.x.
+ <li>Various other dependencies have been removed as they are no longer needed or now provided by the container.
+</ul>
<h2><a name="Details">Detailed Release Notes</a></h2>
Detailed Release Notes - Teiid - Version 7.1
Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -27,6 +27,8 @@
import java.io.IOException;
import java.util.Collection;
+import javax.xml.bind.JAXBException;
+
import junit.framework.Assert;
import org.mockito.Mockito;
@@ -65,6 +67,8 @@
util.setUDF(methods);
} catch (IOException e) {
throw new TeiidRuntimeException("failed to load UDF"); //$NON-NLS-1$
+ } catch (JAXBException e) {
+ throw new TeiidRuntimeException("failed to load UDF"); //$NON-NLS-1$
}
}
return util.parseCommand(sql);
Modified: trunk/engine/pom.xml
===================================================================
--- trunk/engine/pom.xml 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/pom.xml 2010-07-13 01:29:08 UTC (rev 2334)
@@ -78,11 +78,6 @@
</dependency>
<dependency>
- <groupId>jdom</groupId>
- <artifactId>jdom</artifactId>
- </dependency>
-
- <dependency>
<groupId>net.sourceforge.saxon</groupId>
<artifactId>saxon</artifactId>
</dependency>
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataReader.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataReader.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataReader.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -1,126 +1,28 @@
-/*
- * 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.query.function.metadata;
-import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.Namespace;
-import org.teiid.internal.core.xml.JdomHelper;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * This class is reader for the UDF xmi file. This class reads a xmi file and loads the functions
- */
+@XmlType
+@XmlRootElement(namespace="http://www.omg.org/XMI", name="XMI")
public class FunctionMetadataReader {
-
- private static final String NOT_ALLOWED = "NOT_ALLOWED"; //$NON-NLS-1$
- private static final String ALLOWED = "ALLOWED"; //$NON-NLS-1$
- private static final String REQUIRED = "REQUIRED"; //$NON-NLS-1$
- private static final String RETURN_PARAMETER = "returnParameter"; //$NON-NLS-1$
- private static final String TYPE = "type"; //$NON-NLS-1$
- private static final String INPUT_PARAMETERS = "inputParameters"; //$NON-NLS-1$
- private static final String DETERMINISTIC = "deterministic"; //$NON-NLS-1$
- private static final String PUSH_DOWN = "pushDown"; //$NON-NLS-1$
- private static final String INVOCATION_METHOD = "invocationMethod"; //$NON-NLS-1$
- private static final String INVOCATION_CLASS = "invocationClass"; //$NON-NLS-1$
- private static final String CATEGORY = "category"; //$NON-NLS-1$
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String NAME = "name"; //$NON-NLS-1$
- private static final String SCALAR_FUNCTION = "ScalarFunction"; //$NON-NLS-1$
- private static final String NS_MMFUNCTION = "mmfunction"; //$NON-NLS-1$
- public static List<FunctionMethod> loadFunctionMethods(InputStream source) throws IOException {
- try {
- List<FunctionMethod> methods = new ArrayList<FunctionMethod>();
-
- Document doc = JdomHelper.buildDocument(source);
- Element rootElement = doc.getRootElement();
-
- // read the xmi file and load the functions
- Namespace ns = rootElement.getNamespace(NS_MMFUNCTION);
- List<Element> functionElements = rootElement.getChildren(SCALAR_FUNCTION, ns);
- for (Element functionElement:functionElements) {
-
- String name = functionElement.getAttributeValue(NAME);
- String description = functionElement.getAttributeValue(DESCRIPTION);
- String category = functionElement.getAttributeValue(CATEGORY);
- String invocationClass = functionElement.getAttributeValue(INVOCATION_CLASS);
- String invocationMethod = functionElement.getAttributeValue(INVOCATION_METHOD);
- int pushdown= decodePushDownType(functionElement.getAttributeValue(PUSH_DOWN));
- boolean deterministic = Boolean.parseBoolean(functionElement.getAttributeValue(DETERMINISTIC));
-
- // read input parameters
- List<FunctionParameter> inParamters = new ArrayList<FunctionParameter>();
- List<Element> inputParameterElements = functionElement.getChildren(INPUT_PARAMETERS);
- for (Element inputElement:inputParameterElements) {
- inParamters.add(new FunctionParameter(inputElement.getAttributeValue(NAME), inputElement.getAttributeValue(TYPE), inputElement.getAttributeValue(DESCRIPTION)));
- }
-
- // read return for the function
- FunctionParameter returnParameter = null;
- Element returnElement = functionElement.getChild(RETURN_PARAMETER);
- if (returnElement != null) {
- returnParameter = new FunctionParameter(FunctionParameter.OUTPUT_PARAMETER_NAME,returnElement.getAttributeValue(TYPE), returnElement.getAttributeValue(DESCRIPTION));
- }
-
- FunctionMethod function = new FunctionMethod(
- name,
- description,
- category,
- pushdown,
- invocationClass,
- invocationMethod,
- inParamters.toArray(new FunctionParameter[inParamters.size()]),
- returnParameter,
- true,
- deterministic ? FunctionMethod.DETERMINISTIC: FunctionMethod.NONDETERMINISTIC);
-
- methods.add(function);
- }
- return methods;
- } catch (JDOMException e) {
- throw new IOException(e);
- }
+ @XmlElement(namespace="http://www.metamatrix.com/metamodels/MetaMatrixFunction", name="ScalarFunction")
+ List<FunctionMethod> functionMethods = new ArrayList<FunctionMethod>();
+
+ public static List<FunctionMethod> loadFunctionMethods(InputStream source) throws JAXBException {
+ JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {FunctionMetadataReader.class});
+ Unmarshaller marshaller = jc.createUnmarshaller();
+ FunctionMetadataReader md = (FunctionMetadataReader) marshaller.unmarshal(source);
+ return md.functionMethods;
}
-
- private static int decodePushDownType(String pushdown) {
- if (pushdown != null) {
- if (pushdown.equals(REQUIRED)) {
- return FunctionMethod.CAN_PUSHDOWN;
- } else if (pushdown.equals(ALLOWED)) {
- return FunctionMethod.MUST_PUSHDOWN;
- } else if (pushdown.equals(NOT_ALLOWED)) {
- return FunctionMethod.CANNOT_PUSHDOWN;
- }
- }
- return FunctionMethod.CAN_PUSHDOWN;
- }
-
+
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMethod.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMethod.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMethod.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -25,6 +25,9 @@
import java.io.Serializable;
import java.util.Arrays;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
import org.teiid.core.util.HashCodeUtil;
@@ -53,6 +56,10 @@
* @see FunctionCategoryConstants
*/
public class FunctionMethod implements Serializable {
+
+ private static final String NOT_ALLOWED = "NOT_ALLOWED"; //$NON-NLS-1$
+ private static final String ALLOWED = "ALLOWED"; //$NON-NLS-1$
+ private static final String REQUIRED = "REQUIRED"; //$NON-NLS-1$
public static final int CAN_PUSHDOWN = 0;
public static final int CANNOT_PUSHDOWN = 1;
@@ -188,6 +195,7 @@
* Return name of method
* @return Name
*/
+ @XmlAttribute
public String getName() {
return this.name;
}
@@ -204,6 +212,7 @@
* Get description of method
* @return Description
*/
+ @XmlAttribute
public String getDescription() {
return this.description;
}
@@ -221,6 +230,7 @@
* @return Category
* @see FunctionCategoryConstants
*/
+ @XmlAttribute
public String getCategory() {
return this.category;
}
@@ -250,10 +260,26 @@
this.pushdown = pushdown;
}
+ @XmlAttribute
+ public void setPushDown(String pushdown) {
+ if (pushdown != null) {
+ if (pushdown.equals(REQUIRED)) {
+ this.pushdown = FunctionMethod.MUST_PUSHDOWN;
+ } else if (pushdown.equals(ALLOWED)) {
+ this.pushdown = FunctionMethod.CAN_PUSHDOWN;
+ } else if (pushdown.equals(NOT_ALLOWED)) {
+ this.pushdown = FunctionMethod.CANNOT_PUSHDOWN;
+ }
+ } else {
+ this.pushdown = FunctionMethod.CAN_PUSHDOWN;
+ }
+ }
+
/**
* Get invocation class name
* @return Invocation class name
*/
+ @XmlAttribute
public String getInvocationClass() {
return this.invocationClass;
}
@@ -270,6 +296,7 @@
* Get invocation method name
* @return Invocation method name
*/
+ @XmlAttribute
public String getInvocationMethod() {
return this.invocationMethod;
}
@@ -297,6 +324,7 @@
* Get input parameters
* @return Array of input parameters, may be null if 0 parameters
*/
+ @XmlElement
public FunctionParameter[] getInputParameters() {
return this.inputParameters;
}
@@ -313,6 +341,7 @@
* Get ouput parameter.
* @return Output parameter or return argument
*/
+ @XmlElement(name="returnParameter")
public FunctionParameter getOutputParameter() {
return this.outputParameter;
}
@@ -321,7 +350,10 @@
* Set ouput parameter.
* @param param Output Parameter
*/
- public void setOutputParameter(FunctionParameter param) {
+ public void setOutputParameter(FunctionParameter param) {
+ if (param != null) {
+ param.setName(FunctionParameter.OUTPUT_PARAMETER_NAME);
+ }
this.outputParameter = param;
}
@@ -464,7 +496,12 @@
public int getDeterministic() {
return this.deterministic;
}
-
+
+ @XmlAttribute(name="deterministic")
+ public void setDeterministicBoolean(boolean deterministic) {
+ this.deterministic = deterministic ? FunctionMethod.DETERMINISTIC : FunctionMethod.NONDETERMINISTIC;
+ }
+
public void setDeterministic(int deterministic) {
this.deterministic = deterministic;
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionParameter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionParameter.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionParameter.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -24,6 +24,8 @@
import java.io.Serializable;
+import javax.xml.bind.annotation.XmlAttribute;
+
/**
* A function parameter defines the name and description of an input or output
* parameter for a function. The name should not be null, but that is not
@@ -76,6 +78,7 @@
* Return name of parameter.
* @return Name
*/
+ @XmlAttribute
public String getName() {
return this.name;
}
@@ -92,6 +95,7 @@
* Get description of parameter
* @return Description
*/
+ @XmlAttribute
public String getDescription() {
return this.description;
}
@@ -109,6 +113,7 @@
* @return Type name
* @see org.teiid.core.types.DataTypeManager.DefaultDataTypes
*/
+ @XmlAttribute
public String getType() {
return this.type;
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingLoader.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingLoader.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingLoader.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -22,21 +22,27 @@
package org.teiid.query.mapping.xml;
-import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.jdom.input.SAXBuilder;
-import org.teiid.internal.core.xml.SAXBuilderHelper;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
import org.teiid.query.QueryPlugin;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
/**
@@ -62,26 +68,23 @@
*/
public MappingDocument loadDocument(InputStream stream) throws MappingException {
try {
- SAXBuilder builder = SAXBuilderHelper.createSAXBuilder( false ); // Do not validate XML
- Document doc = builder.build(stream);
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setValidating(false);
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ Document doc = db.parse(stream);
return loadContents(doc);
- } catch (JDOMException e) {
- throw new MappingException(e);
} catch (IOException e) {
throw new MappingException(e);
- }
+ } catch (ParserConfigurationException e) {
+ throw new MappingException(e);
+ } catch (SAXException e) {
+ throw new MappingException(e);
+ }
}
- public MappingDocument loadDocument(String fileName) throws MappingException {
- try {
- SAXBuilder builder = SAXBuilderHelper.createSAXBuilder( false ); // Do not validate XML
- Document doc = builder.build(new File(fileName) );
- return loadContents(doc);
- } catch (JDOMException e) {
- throw new MappingException(e);
- } catch (IOException e) {
- throw new MappingException(e);
- }
+ public MappingDocument loadDocument(String fileName) throws MappingException, FileNotFoundException {
+ FileInputStream fis = new FileInputStream(fileName);
+ return loadDocument(fis);
}
/**
@@ -90,10 +93,10 @@
MappingDocument loadContents(Document document) throws MappingException {
MappingDocument doc = new MappingDocument(false);
- loadDocumentProperties(doc, document.getRootElement());
+ loadDocumentProperties(doc, document.getDocumentElement());
// now load all the children
- Collection mappingChildren = document.getRootElement().getChildren(MappingNodeConstants.Tags.MAPPING_NODE_NAME);
+ Collection mappingChildren = getChildren(document.getDocumentElement(), MappingNodeConstants.Tags.MAPPING_NODE_NAME);
doc = (MappingDocument)recursiveLoadContents(mappingChildren, doc);
return doc;
}
@@ -107,11 +110,34 @@
node = processMappingNode(elem, parent);
- Collection childrenMappingNodes = elem.getChildren(MappingNodeConstants.Tags.MAPPING_NODE_NAME);
+ Collection childrenMappingNodes = getChildren(elem, MappingNodeConstants.Tags.MAPPING_NODE_NAME);
recursiveLoadContents(childrenMappingNodes, node);
}
return parent;
}
+
+ public Collection<Element> getChildren(Element elem, String name) {
+ NodeList children = elem.getChildNodes();
+ LinkedList<Element> results = new LinkedList<Element>();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node node = children.item(i);
+ if (node instanceof Element && node.getNodeName().equals(name)) {
+ results.add((Element)node);
+ }
+ }
+ return results;
+ }
+
+ public Element getChild(Element elem, String name) {
+ NodeList children = elem.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node node = children.item(i);
+ if (node instanceof Element && node.getNodeName().equals(name)) {
+ return (Element)node;
+ }
+ }
+ return null;
+ }
/**
* Load a "sequence" node from the mapping document
@@ -379,64 +405,66 @@
*/
private Namespace[] getNamespaceDeclarations(Element element) {
ArrayList namespaces = new ArrayList();
- Iterator elements = this.getElements(element, MappingNodeConstants.Tags.NAMESPACE_DECLARATION).iterator();
+ Iterator elements = getChildren(element, MappingNodeConstants.Tags.NAMESPACE_DECLARATION).iterator();
while (elements.hasNext()){
Element namespace = (Element)elements.next();
Element prefixEl = getElement(namespace, MappingNodeConstants.Tags.NAMESPACE_DECLARATION_PREFIX);
Element uriEl = getElement(namespace, MappingNodeConstants.Tags.NAMESPACE_DECLARATION_URI);
- String prefix = (prefixEl != null ? prefixEl.getTextTrim() : MappingNodeConstants.DEFAULT_NAMESPACE_PREFIX);
- String uri = uriEl.getTextTrim();
+ String prefix = (prefixEl != null ? getTextTrim(prefixEl) : MappingNodeConstants.DEFAULT_NAMESPACE_PREFIX);
+ String uri = getTextTrim(uriEl);
namespaces.add(new Namespace(prefix, uri));
}
return (Namespace[])namespaces.toArray(new Namespace[namespaces.size()]);
}
+
+ static String getTextTrim(Element element) {
+ if (element == null) {
+ return null;
+ }
+ String result = element.getTextContent();
+ if (result != null) {
+ return result.trim();
+ }
+ return result;
+ }
/**
* Get a specific child element of an element.
*/
Element getElement( Element element, String childName ) {
- return element.getChild(childName);
+ return getChild(element, childName);
}
String getElementValue( Element element, String childName ) {
- Element child = element.getChild(childName);
- if (child != null) {
- return child.getTextTrim();
- }
- return null;
+ Element child = getChild(element, childName);
+ return getTextTrim(child);
}
String getElementValue( Element element, String childName , String defalt) {
- Element child = element.getChild(childName);
- if (child != null) {
- return child.getTextTrim();
+ Element child = getChild(element, childName);
+ String result = getTextTrim(child);
+ if (result == null) {
+ return defalt;
}
- return defalt;
+ return result;
}
int getIntElementValue( Element element, String childName , int defalt) {
- Element child = element.getChild(childName);
+ Element child = getChild(element, childName);
if (child != null) {
- return Integer.valueOf(child.getTextTrim()).intValue();
+ return Integer.valueOf(getTextTrim(child)).intValue();
}
return defalt;
}
boolean getBooleanElementValue( Element element, String childName , boolean defalt) {
- Element child = element.getChild(childName);
+ Element child = getChild(element, childName);
if (child != null) {
- return Boolean.valueOf(child.getTextTrim()).booleanValue();
+ return Boolean.valueOf(getTextTrim(child)).booleanValue();
}
return defalt;
}
- /**
- * Get Collection of specifically-named child element of an element.
- */
- Collection getElements( Element element, String childName ) {
- return element.getChildren(childName);
- }
-
String getName(Element element) {
return getElementValue(element, MappingNodeConstants.Tags.NAME);
}
@@ -531,10 +559,10 @@
List getStagingTableNames(Element element) {
ArrayList cacheGroups = new ArrayList();
- Collection tempGroupElements = getElements(element, MappingNodeConstants.Tags.TEMP_GROUP_NAME);
+ Collection tempGroupElements = getChildren(element, MappingNodeConstants.Tags.TEMP_GROUP_NAME);
for (Iterator i = tempGroupElements.iterator(); i.hasNext();) {
Element tempGroup = (Element)i.next();
- cacheGroups.add(tempGroup.getTextTrim());
+ cacheGroups.add(getTextTrim(tempGroup));
}
return cacheGroups;
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -30,11 +30,10 @@
import java.util.Map;
import java.util.Properties;
-import org.jdom.Document;
-import org.jdom.Element;
-import org.jdom.Namespace;
-import org.jdom.output.XMLOutputter;
-import org.teiid.internal.core.xml.JdomHelper;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
import org.teiid.query.QueryPlugin;
import org.teiid.query.util.ErrorMessageKeys;
@@ -49,43 +48,36 @@
*/
public class MappingOutputter {
- private static final String NS_NAME = null;
- private static final String NS_URL = null;
private static final String ELEM_ROOT = MappingNodeConstants.Tags.MAPPING_ROOT_NAME;
private static final String ELEM_NODE = MappingNodeConstants.Tags.MAPPING_NODE_NAME;
+
+ XMLStreamWriter writer;
- /** The namespace for the XML mapping document. */
- private Namespace namespace = Namespace.getNamespace( NS_NAME, NS_URL );
-
/**
- * <p>Ouput the current JDOM <code>Document</code> to the output stream.</p>
- *
* @param stream The output stream
*
* @throws IOException if there are problems writing to the file.
*/
public void write(MappingDocument doc, PrintWriter stream) throws IOException {
- write(doc, stream,false,false);
+ try {
+ XMLOutputFactory xof = XMLOutputFactory.newInstance();
+ writer = xof.createXMLStreamWriter(stream);
+ writer.writeStartDocument("UTF-8", "1.0"); //$NON-NLS-1$ //$NON-NLS-2$
+ writer.writeStartElement(ELEM_ROOT);
+ writeElement(MappingNodeConstants.Tags.DOCUMENT_ENCODING, doc.getDocumentEncoding());
+ writeElement(MappingNodeConstants.Tags.FORMATTED_DOCUMENT, Boolean.toString(doc.isFormatted()));
+ loadNode(doc.getRootNode());
+ writer.writeEndElement();
+ writer.writeEndDocument();
+ } catch (XMLStreamException e) {
+ throw new IOException(e);
+ }
}
-
- /**
- * <p>Ouput the current JDOM <code>Document</code> to the output stream.</p>
- *
- * @param stream The output stream
- * @param newlines true if the output should contain newline characters, or false otherwise
- * @param indent true if the output should be indented, or false otherwise.
- *
- * @throws IOException if there are problems writing to the file.
- */
- public void write(MappingDocument doc, PrintWriter stream, final boolean newlines, final boolean indent )
- throws IOException {
-
- String indentString = ""; //$NON-NLS-1$
- if (indent) {
- indentString = " "; //$NON-NLS-1$
- }
- XMLOutputter outputter = new XMLOutputter(JdomHelper.getFormat(indentString, newlines));
- outputter.output( loadDocument(doc), stream );
+
+ void writeElement(String name, String content) throws XMLStreamException {
+ writer.writeStartElement(name);
+ writer.writeCharacters(content);
+ writer.writeEndElement();
}
// =========================================================================
@@ -94,112 +86,76 @@
/**
* <p>Load XML document from domain object. </p>
+ * @throws XMLStreamException
*/
- Document loadDocument(MappingDocument mappingDoc) {
- Document xmlDoc = new Document(new Element(ELEM_ROOT, namespace));
- setDocumentProperties(mappingDoc, xmlDoc.getRootElement());
-
- loadNode(mappingDoc.getRootNode(), xmlDoc.getRootElement());
- return xmlDoc;
- }
+ void loadNode( MappingNode node ) throws XMLStreamException {
+ writer.writeStartElement(ELEM_NODE);
- /**
- * Set the document spefic properties
- */
- void setDocumentProperties(MappingDocument mappingDoc, Element rootElement) {
- rootElement.addContent(new Element(MappingNodeConstants.Tags.DOCUMENT_ENCODING).setText(mappingDoc.getDocumentEncoding()));
- rootElement.addContent(new Element(MappingNodeConstants.Tags.FORMATTED_DOCUMENT).setText(Boolean.toString(mappingDoc.isFormatted())));
- }
-
- /**
- * <p>Load XML document from domain object. </p>
- */
- void loadNode( MappingNode node, Element parentElement ) {
-
- Element element = processNode( node, parentElement );
-
- Iterator children = node.getChildren().iterator();
- while ( children.hasNext() ) {
- MappingNode child = (MappingNode)children.next();
- loadNode( child, element );
- }
- }
-
- /**
- * Process a mapping node, creating an XML element for it.
- */
- Element processNode( MappingNode node, Element parentElement ) {
-
- Element element = new Element( ELEM_NODE, namespace );
- parentElement.addContent( element );
-
//namespace declarations have to be handled specially
Properties namespaces = (Properties)node.getProperty(MappingNodeConstants.Properties.NAMESPACE_DECLARATIONS);
if (namespaces != null){
- addNamespaceDeclarations(element, namespaces);
+ addNamespaceDeclarations(namespaces);
}
// Only get the property values actually stored in the MappingNode, not
// default values also
Map properties = node.getNodeProperties();
- addElementProperties( element, properties );
+ addElementProperties(properties );
- return element;
+ Iterator children = node.getChildren().iterator();
+ while ( children.hasNext() ) {
+ MappingNode child = (MappingNode)children.next();
+ loadNode( child );
+ }
+ writer.writeEndElement();
}
- private void addNamespaceDeclarations(Element element, Properties namespaces){
+ private void addNamespaceDeclarations(Properties namespaces) throws XMLStreamException{
Enumeration e = namespaces.propertyNames();
while (e.hasMoreElements()){
String prefix = (String)e.nextElement();
String uri = namespaces.getProperty(prefix);
- Element namespaceDeclaration = new Element(MappingNodeConstants.Tags.NAMESPACE_DECLARATION, namespace);
+ writer.writeStartElement(MappingNodeConstants.Tags.NAMESPACE_DECLARATION);
if (!prefix.equals(MappingNodeConstants.DEFAULT_NAMESPACE_PREFIX)){
- namespaceDeclaration.addContent( new Element(MappingNodeConstants.Tags.NAMESPACE_DECLARATION_PREFIX).setText(prefix) );
+ writeElement(MappingNodeConstants.Tags.NAMESPACE_DECLARATION_PREFIX, prefix);
}
- namespaceDeclaration.addContent( new Element(MappingNodeConstants.Tags.NAMESPACE_DECLARATION_URI).setText(uri) );
- element.addContent( namespaceDeclaration);
+ writeElement(MappingNodeConstants.Tags.NAMESPACE_DECLARATION_URI, uri);
+ writer.writeEndElement();
}
}
/**
- * Utility to put a property into a map only if the value is not null.
- */
- void addProperty( Map map, String name, Object value ) {
- if ( value != null ) {
- map.put( name, value );
- }
- }
-
- /**
* Add a set of properties to an XML node.
+ * @throws XMLStreamException
*/
- void addElementProperties( Element element, Map properties ) {
+ void addElementProperties(Map properties ) throws XMLStreamException {
Iterator propNames = MappingNodeConstants.Tags.OUTPUTTER_PROPERTY_TAGS.iterator();
while ( propNames.hasNext() ) {
String propName = (String)propNames.next();
Integer propKey = MappingNodeConstants.getPropertyInteger(propName);
if ( properties.containsKey(propKey) ) {
Object value = properties.get(propKey);
- addElementProperty( element, propName, value );
+ addElementProperty( propName, value );
}
}
}
/**
* Add a single property to an XML node.
+ * @throws XMLStreamException
*/
- void addElementProperty( Element element, String name, Object value ) {
+ void addElementProperty(String name, Object value ) throws XMLStreamException {
if ( value == null ) {
throw new IllegalArgumentException( QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0010, name) );
}
if (value instanceof Collection){
Iterator i = ((Collection)value).iterator();
while (i.hasNext()) {
- element.addContent( new Element(name,namespace).setText(getXMLText(i.next())));
+ writeElement(name, getXMLText(i.next()));
}
} else {
- element.addContent( new Element(name,namespace).setText(getXMLText(value)));
+ writeElement(name, getXMLText(value));
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/test/java/org/teiid/query/function/TestFunctionMetadataReader.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -26,14 +26,13 @@
import java.io.FileInputStream;
import java.util.List;
+import junit.framework.TestCase;
+
import org.teiid.core.util.UnitTestUtil;
import org.teiid.query.function.metadata.FunctionMetadataReader;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.function.metadata.FunctionParameter;
-
-import junit.framework.TestCase;
-
public class TestFunctionMetadataReader extends TestCase {
public void testLoadFunctionMethods() throws Exception {
Modified: trunk/engine/src/test/java/org/teiid/query/function/source/TestXMLSystemFunctions.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/function/source/TestXMLSystemFunctions.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/test/java/org/teiid/query/function/source/TestXMLSystemFunctions.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -29,8 +29,6 @@
import net.sf.saxon.trans.XPathException;
-import org.jdom.Attribute;
-import org.jdom.Element;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -61,43 +59,6 @@
return XMLSystemFunctions.xpathValue(xmlContent,xpath);
}
- public void helpCheckElement(final Object jdomNode, final String name, final String prefix, final String namespaceUri,
- final String textContent) {
- assertTrue("Supplied JDOM node is not an Element", jdomNode instanceof Element); //$NON-NLS-1$
- final Element element = (Element)jdomNode;
- assertEquals(name, element.getName());
- assertEquals(prefix, element.getNamespacePrefix());
- assertEquals(namespaceUri, element.getNamespaceURI());
-
- final String actualTextContent = element.getText();
- if (textContent == null) {
- assertEquals(0, actualTextContent.length());
- } else {
- assertEquals(textContent, actualTextContent);
- }
- }
-
- public void helpCheckElement(final Object jdomNode, final String name, final String prefix, final String namespaceUri) {
- assertTrue("Supplied JDOM node is not an Element", jdomNode instanceof Element); //$NON-NLS-1$
- final Element element = (Element)jdomNode;
- assertEquals(name, element.getName());
- assertEquals(prefix, element.getNamespacePrefix());
- assertEquals(namespaceUri, element.getNamespaceURI());
- }
-
- public void helpCheckAttribute(final Object jdomNode, final String name,
- final String prefix, final String namespaceUri,
- final String value ) {
- assertTrue("Supplied JDOM node is not an Attribute",jdomNode instanceof Attribute); //$NON-NLS-1$
- final Attribute attribute = (Attribute)jdomNode;
- assertEquals(name,attribute.getName());
- assertEquals(prefix,attribute.getNamespacePrefix());
- assertEquals(namespaceUri,attribute.getNamespaceURI());
-
- final String actualTextContent = attribute.getValue();
- assertEquals(value,actualTextContent);
- }
-
@Test public void testElement() throws Exception {
String doc = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><a><b><c>test</c></b></a>"; //$NON-NLS-1$
String xpath = "a/b/c"; //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/mapping/xml/TestMappingOutputter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/mapping/xml/TestMappingOutputter.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/engine/src/test/java/org/teiid/query/mapping/xml/TestMappingOutputter.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -29,6 +29,8 @@
import java.io.StringWriter;
import java.util.ArrayList;
+import javax.xml.bind.JAXBException;
+
import org.teiid.query.mapping.xml.MappingAttribute;
import org.teiid.query.mapping.xml.MappingChoiceNode;
import org.teiid.query.mapping.xml.MappingCriteriaNode;
Modified: trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
===================================================================
--- trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -31,6 +31,8 @@
import java.util.Arrays;
import java.util.Collection;
+import javax.xml.bind.JAXBException;
+
import org.teiid.core.CoreConstants;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.FileUtils;
@@ -84,6 +86,8 @@
return vdbmetadata;
} catch (URISyntaxException e) {
throw new IOException(e);
+ } catch (JAXBException e) {
+ throw new IOException(e);
}
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/pom.xml 2010-07-13 01:29:08 UTC (rev 2334)
@@ -355,11 +355,6 @@
<!-- External dependencies -->
<dependency>
- <groupId>jdom</groupId>
- <artifactId>jdom</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<version>1.5</version>
Modified: trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java 2010-07-12 20:59:02 UTC (rev 2333)
+++ trunk/runtime/src/main/java/org/teiid/deployers/UDFMetaData.java 2010-07-13 01:29:08 UTC (rev 2334)
@@ -26,6 +26,8 @@
import java.util.Collection;
import java.util.HashMap;
+import javax.xml.bind.JAXBException;
+
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.virtual.VirtualFile;
import org.teiid.query.function.metadata.FunctionMetadataReader;
@@ -44,7 +46,7 @@
}
- void buildFunctionModelFile(String name) throws IOException {
+ void buildFunctionModelFile(String name) throws IOException, JAXBException {
VirtualFile file = this.files.get(name);
if (file != null) {
this.methods.addAll(FunctionMetadataReader.loadFunctionMethods(file.openStream()));
Copied: trunk/test-integration/db/src/test/java/org/teiid/internal/core/xml (from rev 2323, trunk/engine/src/main/java/org/teiid/internal/core/xml)
15 years, 9 months