teiid SVN: r3999 - in trunk: admin and 30 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-04-13 11:52:37 -0400 (Fri, 13 Apr 2012)
New Revision: 3999
Modified:
trunk/admin/pom.xml
trunk/adminshell/pom.xml
trunk/api/pom.xml
trunk/build/pom.xml
trunk/client-jdk15/pom.xml
trunk/client/pom.xml
trunk/common-core/pom.xml
trunk/connectors/connector-file/pom.xml
trunk/connectors/connector-ldap/pom.xml
trunk/connectors/connector-salesforce/pom.xml
trunk/connectors/connector-ws/pom.xml
trunk/connectors/pom.xml
trunk/connectors/salesforce-api/pom.xml
trunk/connectors/sandbox/pom.xml
trunk/connectors/sandbox/translator-yahoo/pom.xml
trunk/connectors/translator-file/pom.xml
trunk/connectors/translator-hive/pom.xml
trunk/connectors/translator-jdbc/pom.xml
trunk/connectors/translator-ldap/pom.xml
trunk/connectors/translator-loopback/pom.xml
trunk/connectors/translator-olap/pom.xml
trunk/connectors/translator-salesforce/pom.xml
trunk/connectors/translator-ws/pom.xml
trunk/engine/pom.xml
trunk/hibernate-dialect/pom.xml
trunk/jboss-integration/pom.xml
trunk/metadata/pom.xml
trunk/pom.xml
trunk/runtime/pom.xml
trunk/test-integration/common/pom.xml
trunk/test-integration/db/pom.xml
trunk/test-integration/pom.xml
Log:
[maven-release-plugin] prepare release teiid-parent-8.0.0.CR1
Modified: trunk/admin/pom.xml
===================================================================
--- trunk/admin/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/admin/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-admin</artifactId>
Modified: trunk/adminshell/pom.xml
===================================================================
--- trunk/adminshell/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/adminshell/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-adminshell</artifactId>
Modified: trunk/api/pom.xml
===================================================================
--- trunk/api/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/api/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-api</artifactId>
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/build/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid</artifactId>
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/client/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client</artifactId>
Modified: trunk/client-jdk15/pom.xml
===================================================================
--- trunk/client-jdk15/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/client-jdk15/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client-jdk15</artifactId>
Modified: trunk/common-core/pom.xml
===================================================================
--- trunk/common-core/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/common-core/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-common-core</artifactId>
Modified: trunk/connectors/connector-file/pom.xml
===================================================================
--- trunk/connectors/connector-file/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/connector-file/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-file</artifactId>
Modified: trunk/connectors/connector-ldap/pom.xml
===================================================================
--- trunk/connectors/connector-ldap/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/connector-ldap/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ldap</artifactId>
Modified: trunk/connectors/connector-salesforce/pom.xml
===================================================================
--- trunk/connectors/connector-salesforce/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/connector-salesforce/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-salesforce</artifactId>
Modified: trunk/connectors/connector-ws/pom.xml
===================================================================
--- trunk/connectors/connector-ws/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/connector-ws/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ws</artifactId>
Modified: trunk/connectors/pom.xml
===================================================================
--- trunk/connectors/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/connectors/salesforce-api/pom.xml
===================================================================
--- trunk/connectors/salesforce-api/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/salesforce-api/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>salesforce-api</artifactId>
Modified: trunk/connectors/sandbox/pom.xml
===================================================================
--- trunk/connectors/sandbox/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/sandbox/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid.connectors</groupId>
Modified: trunk/connectors/sandbox/translator-yahoo/pom.xml
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/sandbox/translator-yahoo/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-yahoo</artifactId>
Modified: trunk/connectors/translator-file/pom.xml
===================================================================
--- trunk/connectors/translator-file/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-file/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-file</artifactId>
Modified: trunk/connectors/translator-hive/pom.xml
===================================================================
--- trunk/connectors/translator-hive/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-hive/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-hive</artifactId>
Modified: trunk/connectors/translator-jdbc/pom.xml
===================================================================
--- trunk/connectors/translator-jdbc/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-jdbc/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-jdbc</artifactId>
Modified: trunk/connectors/translator-ldap/pom.xml
===================================================================
--- trunk/connectors/translator-ldap/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-ldap/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ldap</artifactId>
Modified: trunk/connectors/translator-loopback/pom.xml
===================================================================
--- trunk/connectors/translator-loopback/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-loopback/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-loopback</artifactId>
Modified: trunk/connectors/translator-olap/pom.xml
===================================================================
--- trunk/connectors/translator-olap/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-olap/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-olap</artifactId>
Modified: trunk/connectors/translator-salesforce/pom.xml
===================================================================
--- trunk/connectors/translator-salesforce/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-salesforce/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-salesforce</artifactId>
Modified: trunk/connectors/translator-ws/pom.xml
===================================================================
--- trunk/connectors/translator-ws/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/connectors/translator-ws/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ws</artifactId>
Modified: trunk/engine/pom.xml
===================================================================
--- trunk/engine/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/engine/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-engine</artifactId>
Modified: trunk/hibernate-dialect/pom.xml
===================================================================
--- trunk/hibernate-dialect/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/hibernate-dialect/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-hibernate-dialect</artifactId>
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/jboss-integration/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/metadata/pom.xml
===================================================================
--- trunk/metadata/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/metadata/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-metadata</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -10,7 +10,7 @@
<artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
<description>Federated SQL and XML query engine.</description>
<properties>
<ant.version>1.7.0</ant.version>
@@ -37,9 +37,9 @@
<version.junit>4.10</version.junit>
</properties>
<scm>
- <connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/teiid/trunk</developerConnection>
- <url>http://anonsvn.jboss.org/repos/teiid/trunk</url>
+ <connection>scm:svn:https://anonsvn.jboss.org/repos/teiid/tags/teiid-parent-8.0.0.CR1</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/teiid/tags/teiid-parent-8.0.0.CR1</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/teiid/tags/teiid-parent-8.0.0.CR1</url>
</scm>
<licenses>
<license>
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/runtime/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/test-integration/common/pom.xml
===================================================================
--- trunk/test-integration/common/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/test-integration/common/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-integration-common</artifactId>
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/test-integration/db/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -9,7 +9,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2012-04-13 15:01:40 UTC (rev 3998)
+++ trunk/test-integration/pom.xml 2012-04-13 15:52:37 UTC (rev 3999)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>8.0.0.CR1-SNAPSHOT</version>
+ <version>8.0.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-test-integration</artifactId>
12 years, 8 months
teiid SVN: r3998 - in trunk: client/src/main/java/org/teiid/net and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-13 11:01:40 -0400 (Fri, 13 Apr 2012)
New Revision: 3998
Modified:
trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java
trunk/client/src/main/java/org/teiid/net/ServerConnection.java
trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
Log:
TEIID-1801 adding an exception in the socket case
Modified: trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2012-04-12 18:49:45 UTC (rev 3997)
+++ trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2012-04-13 15:01:40 UTC (rev 3998)
@@ -406,6 +406,9 @@
resetExecutionState();
if (options != null) {
if (options.isContinuous()) {
+ if (!this.driverConnection.getServerConnection().supportsContinuous()) {
+ throw new TeiidSQLException(JDBCPlugin.Util.getString("JDBC.continuous")); //$NON-NLS-1$
+ }
if (this.getResultSetType() != ResultSet.TYPE_FORWARD_ONLY) {
String msg = JDBCPlugin.Util.getString("JDBC.forward_only_resultset"); //$NON-NLS-1$
throw new TeiidSQLException(msg);
Modified: trunk/client/src/main/java/org/teiid/net/ServerConnection.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/ServerConnection.java 2012-04-12 18:49:45 UTC (rev 3997)
+++ trunk/client/src/main/java/org/teiid/net/ServerConnection.java 2012-04-13 15:01:40 UTC (rev 3998)
@@ -42,4 +42,6 @@
void authenticate() throws ConnectionException, CommunicationException;
+ boolean supportsContinuous();
+
}
\ No newline at end of file
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java 2012-04-12 18:49:45 UTC (rev 3997)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java 2012-04-13 15:01:40 UTC (rev 3998)
@@ -364,4 +364,9 @@
}
}
}
+
+ @Override
+ public boolean supportsContinuous() {
+ return false;
+ }
}
\ No newline at end of file
Modified: trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
===================================================================
--- trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-04-12 18:49:45 UTC (rev 3997)
+++ trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2012-04-13 15:01:40 UTC (rev 3998)
@@ -160,6 +160,7 @@
system_prop_missing=System property "{0}" missing, please add using -D option on the VM startup script.
JDBC.forward_only_resultset=Continuous queries must be forward only and return a result set.
+JDBC.continuous=Continuous queries are not supported over socket connections.
module_load_failed=Teiid Embedded mode Driver failed to load. You must only create this type of connection in the same \
VM as the Teiid Server. Use following driver fragment xml inside the JBoss AS configuration file\
<drivers>\
Modified: trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java 2012-04-12 18:49:45 UTC (rev 3997)
+++ trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java 2012-04-13 15:01:40 UTC (rev 3998)
@@ -169,4 +169,9 @@
public void cleanUp() {
}
+
+ @Override
+ public boolean supportsContinuous() {
+ return true;
+ }
}
12 years, 8 months
teiid SVN: r3997 - in trunk: documentation/javadocs and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-12 14:49:45 -0400 (Thu, 12 Apr 2012)
New Revision: 3997
Modified:
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
trunk/documentation/javadocs/pom.xml
Log:
forward merge from 7.7.1
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2012-04-12 18:49:04 UTC (rev 3996)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2012-04-12 18:49:45 UTC (rev 3997)
@@ -33,7 +33,7 @@
public class StringToTimestampTransform extends Transform {
private static boolean validate = true;
- private static Pattern pattern = Pattern.compile("\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}"); //$NON-NLS-1$
+ private static Pattern pattern = Pattern.compile("\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?"); //$NON-NLS-1$
static {
try {
Modified: trunk/documentation/javadocs/pom.xml
===================================================================
--- trunk/documentation/javadocs/pom.xml 2012-04-12 18:49:04 UTC (rev 3996)
+++ trunk/documentation/javadocs/pom.xml 2012-04-12 18:49:45 UTC (rev 3997)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>8.0</version>
+ <version>8.0.0.alpha2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>javadocs</artifactId>
12 years, 8 months
teiid SVN: r3996 - branches/7.7.x/common-core/src/main/java/org/teiid/core/types/basic.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-12 14:49:04 -0400 (Thu, 12 Apr 2012)
New Revision: 3996
Modified:
branches/7.7.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
Log:
TEIID-1995 adding fractional seconds
Modified: branches/7.7.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
===================================================================
--- branches/7.7.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2012-04-11 20:36:55 UTC (rev 3995)
+++ branches/7.7.x/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2012-04-12 18:49:04 UTC (rev 3996)
@@ -33,7 +33,7 @@
public class StringToTimestampTransform extends Transform {
private static boolean validate = true;
- private static Pattern pattern = Pattern.compile("\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}"); //$NON-NLS-1$
+ private static Pattern pattern = Pattern.compile("\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?"); //$NON-NLS-1$
static {
try {
12 years, 8 months
teiid SVN: r3995 - in trunk/engine/src/main: javacc/org/teiid/query/parser and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-11 16:36:55 -0400 (Wed, 11 Apr 2012)
New Revision: 3995
Modified:
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
Log:
TEIID-1280 removing the possibility for now of dealing with default namespace concepts and externalizing messages
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-04-11 18:52:57 UTC (rev 3994)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-04-11 20:36:55 UTC (rev 3995)
@@ -531,13 +531,13 @@
return Boolean.valueOf(text);
}
- Column getColumn(String columnName, Table table) {
+ Column getColumn(String columnName, Table table) throws ParseException {
for (Column col:table.getColumns()) {
if (col.getName().equalsIgnoreCase(columnName)) {
return col;
}
}
- return null;
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.no_column", columnName, table.getName())); //$NON-NLS-1$
}
void createDDLTrigger(MetadataFactory schema, AlterTrigger trigger) {
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-04-11 18:52:57 UTC (rev 3994)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-04-11 20:36:55 UTC (rev 3995)
@@ -4094,12 +4094,13 @@
void createNameSpace(MetadataFactory factory) :
{
- XMLNamespaces.NamespaceItem item = null;
+ String uri = null;
+ String prefix = null;
}
{
- <SET> nonReserved ("NAMESPACE") item = namespaceItem()
+ <SET> nonReserved ("NAMESPACE") uri = stringVal() <AS> prefix = id()
{
- factory.addNamespace(item.getPrefix(), item.getUri());
+ factory.addNamespace(prefix, uri);
}
}
@@ -4130,11 +4131,11 @@
}
<LPAREN>
- [readProcedureParameter(factory, proc)]
- (<COMMA> readProcedureParameter(factory, proc))*
+ [procedureParameter(factory, proc)]
+ (<COMMA> procedureParameter(factory, proc))*
<RPAREN>
- <RETURNS> (readProcedureReturn(factory, proc) | returnDataType = parseDataType())
+ <RETURNS> (procedureReturn(factory, proc) | returnDataType = parseDataType())
[ optionsClause(proc, factory)
{
@@ -4151,7 +4152,7 @@
}
if (virtual && !function && stmt == null){
- throw new ParseException("Virtual procedure " + procName + " must define the procedure block after 'AS' keyword");
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.virtual_proc_def", procName));
}
if (returnDataType != null){
@@ -4161,35 +4162,20 @@
}
}
-void readProcedureParameter(MetadataFactory factory, Procedure proc) :
+void procedureParameter(MetadataFactory factory, Procedure proc) :
{
String name = null;
ParsedDataType type = null;
- Token direction = null;
+ ProcedureParameter.Type ppType = ProcedureParameter.Type.In;
ProcedureParameter param = null;
}
{
- [((direction = <IN>)|(direction=<OUT>)|(direction=<INOUT>))]
+ [((<IN> {ppType = ProcedureParameter.Type.In ;})
+ |(<OUT> {ppType = ProcedureParameter.Type.Out;})
+ |(<INOUT> {ppType = ProcedureParameter.Type.InOut;}))]
name = id()
type = parseDataType()
{
- ProcedureParameter.Type ppType = ProcedureParameter.Type.In;
-
- if (direction == null){
- ppType = ProcedureParameter.Type.In;
- }
- else if (direction.image.equalsIgnoreCase("in")){
- ppType = ProcedureParameter.Type.In ;
- }
- else if (direction.image.equalsIgnoreCase("out")){
- ppType = ProcedureParameter.Type.Out;
- }
- else if (direction.image.equalsIgnoreCase("inout")){
- ppType = ProcedureParameter.Type.InOut;
- }
- else {
- throw new ParseException("Unknown type of parameter on procedure "+ proc.getName());
- }
try {
param = factory.addProcedureParameter(name, type.type, ppType, proc);
if (type.length != null){
@@ -4207,7 +4193,7 @@
}
}
-void readProcedureReturn(MetadataFactory factory, Procedure proc) :
+void procedureReturn(MetadataFactory factory, Procedure proc) :
{
String name = null;
ParsedDataType type = null;
@@ -4252,9 +4238,9 @@
(LOOKAHEAD(2) <COMMA>
createColumn(factory, table)
)*
- [<CONSTRAINT> (readPrimaryKeys(factory, table) | readConstraints(factory, table) | readForeignKeys(factory, table))
+ [<CONSTRAINT> (primaryKeys(factory, table) | constraints(factory, table) | foreignKeys(factory, table))
(<COMMA>
- (readConstraints(factory, table)|readForeignKeys(factory, table))
+ (primaryKeys(factory, table) | constraints(factory, table)|foreignKeys(factory, table))
)*
]
<RPAREN>]
@@ -4265,17 +4251,16 @@
]
[<AS> query = queryExpression(new ParseInfo())]
{
- if (view && query == null){
- throw new ParseException("View definition must have query plan defined");
- }
-
if (view){
- table.setSelectTransformation(query.toString());
- }
+ if (query == null) {
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.view_def", tableName));
+ }
+ table.setSelectTransformation(query.toString());
+ }
}
}
-void readForeignKeys(MetadataFactory factory, Table table) :
+void foreignKeys(MetadataFactory factory, Table table) :
{
List<String> columnNames = null;
String viewName = null;
@@ -4290,9 +4275,6 @@
{
for (String col: columnNames) {
column = getColumn(col, table);
- if (column == null) {
- throw new ParseException("Column name "+ col + " not found in table "+ table.getName());
- }
}
}
<REFERENCES>
@@ -4307,7 +4289,7 @@
}
}
-void readPrimaryKeys(MetadataFactory factory, Table table) :
+void primaryKeys(MetadataFactory factory, Table table) :
{
List<String> columnNames = null;
Column column = null;
@@ -4318,12 +4300,9 @@
columnNames = getColumnNames();
for (String col: columnNames) {
column = getColumn(col, table);
- if (column == null) {
- throw new ParseException("Column name "+ col + " not found in table "+ table.getName());
- }
}
if (table.getPrimaryKey() != null){
- throw new ParseException("Primary Key is already defined on "+ table.getName());
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.pk_exists", table.getName()));
}
try{
factory.addPrimaryKey("PK", columnNames, table);
@@ -4333,7 +4312,7 @@
}
}
-void readConstraints(MetadataFactory factory, Table table) :
+void constraints(MetadataFactory factory, Table table) :
{
KeyRecord keyrecord = null;
Column column = null;
@@ -4346,9 +4325,6 @@
columnNames = getColumnNames();
for (String col: columnNames) {
column = getColumn(col, table);
- if (column == null) {
- throw new ParseException("Column name "+ col + " not found in table "+ table.getName());
- }
}
try{
if (type.equalsIgnoreCase("INDEX")) {
@@ -4450,7 +4426,7 @@
if (pk) {
if (table.getPrimaryKey() != null) {
- throw new ParseException("Primary Key is already defined on "+ table.getName());
+ throw new ParseException(QueryPlugin.Util.getString("SQLParser.pk_exists", table.getName()));
}
factory.addPrimaryKey(element, columnName, table);
}
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-04-11 18:52:57 UTC (rev 3994)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-04-11 20:36:55 UTC (rev 3995)
@@ -275,6 +275,10 @@
SQLParser.Invalid_char={0} value must be a single character: [{1}].
SQLParser.expected_non_reserved=Expected non-reserved word {0}, but was {1}.
SQLParser.invalid_window=Cannot window a non-aggregate expression {0}.
+SQLParser.virtual_proc_def=Virtual procedure {0} must define the procedure block after 'AS' keyword
+SQLParser.view_def=Virtual view {0} must be defined with a query expression.
+SQLParser.pk_exists=Primary Key is already defined on {0}
+SQLParser.no_column=Column name {0} not found on table {1}
SystemSource.array_length_desc=Get the length of the given array value
SystemSource.array_param1=Array
SystemSource.array_length_result=The array length
12 years, 8 months
teiid SVN: r3994 - in trunk/build/kits/jboss-as7: bin/scripts and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-04-11 14:52:57 -0400 (Wed, 11 Apr 2012)
New Revision: 3994
Removed:
trunk/build/kits/jboss-as7/domain/
Modified:
trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli
Log:
TEIID-2000: CLI script for installing Teiid in "HA" profile in domain mode
Modified: trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli
===================================================================
--- trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli 2012-04-11 17:45:00 UTC (rev 3993)
+++ trunk/build/kits/jboss-as7/bin/scripts/teiid-domain-mode-install.cli 2012-04-11 18:52:57 UTC (rev 3994)
@@ -1,5 +1,62 @@
connect
-deploy --all-server-groups ../standalone/deployments/teiid-connector-file.rar
-deploy --all-server-groups ../standalone/deployments/teiid-connector-ldap.rar
-deploy --all-server-groups ../standalone/deployments/teiid-connector-salesforce.rar
-deploy --all-server-groups ../standalone/deployments/teiid-connector-ws.rar
+/extension=org.jboss.teiid:add(module=org.jboss.teiid)
+/socket-binding-group=ha-sockets/socket-binding=teiid-jdbc:add(port=31000)
+/socket-binding-group=ha-sockets/socket-binding=teiid-odbc:add(port=35432)
+/server-group=main-server-group:write-attribute(name=profile, value=ha)
+/server-group=main-server-group:write-attribute(name=socket-binding-group, value=ha-sockets)
+
+/profile=ha/subsystem=infinispan/cache-container=teiid-cache:add(default-cache=result-set)
+/profile=ha/subsystem=infinispan/cache-container=teiid-cache/transport=TRANSPORT:add(lock-timeout=60000)
+/profile=ha/subsystem=infinispan/cache-container=teiid-cache/replicated-cache=resultset:add(mode=SYNC, batching=true)
+/profile=ha/subsystem=infinispan/cache-container=teiid-cache/replicated-cache=resultset/locking=LOCKING:add(isolation=READ_COMMITTED)
+/profile=ha/subsystem=infinispan/cache-container=teiid-cache/replicated-cache=resultset/expiration=EXPIRATION:add(lifespan=7200000)
+/profile=ha/subsystem=infinispan/cache-container=teiid-cache/replicated-cache=resultset/eviction=EVICTION:add(max-entries=1024, strategy=LRU)
+
+/profile=ha/subsystem=security/security-domain=teiid-security:add(cache-type=default)
+/profile=ha/subsystem=security/security-domain=teiid-security/authentication=classic:add(login-modules=[{"code"=>"UserRoles", "flag"=>"required", "module-options"=>[("userProperties"=>"teiid-security-user.properties"), ("rolesProperties"=>"teiid-security-roles.properties")]}])
+/profile=ha/subsystem=threads/bounded-queue-thread-pool=teiid-async:add(name=teiid-async, max-threads=4, queue-length=100)
+
+/profile=ha/subsystem=teiid:add(async-thread-pool=teiid-async, distributed-cache-jgroups-stack=udp, resultset-cache-infinispan-container=teiid-cache)
+/profile=ha/subsystem=teiid/transport=embedded:add()
+/profile=ha/subsystem=teiid/transport=jdbc:add(protocol=teiid, socket-binding=teiid-jdbc, ssl-mode=login, authentication-security-domain=teiid-security)
+/profile=ha/subsystem=teiid/transport=odbc:add(protocol=pg, socket-binding=teiid-odbc, authentication-security-domain=teiid-security)
+
+/profile=ha/subsystem=teiid/translator=jdbc-simple:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=jdbc-ansi:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=access:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=db2:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=derby:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=h2:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=hsql:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=informix:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=metamatrix:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=mysql:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=mysql5:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=oracle:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=postgresql:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=sqlserver:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=sybase:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=teiid:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=teradata:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=modeshape:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=ingres:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=ingres93:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=intersystems-cache:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=netezza:add(module=org.jboss.teiid.translator.jdbc)
+/profile=ha/subsystem=teiid/translator=file:add(module=org.jboss.teiid.translator.file)
+/profile=ha/subsystem=teiid/translator=ldap:add(module=org.jboss.teiid.translator.ldap)
+/profile=ha/subsystem=teiid/translator=loopback:add(module=org.jboss.teiid.translator.loopback)
+/profile=ha/subsystem=teiid/translator=olap:add(module=org.jboss.teiid.translator.olap)
+/profile=ha/subsystem=teiid/translator=ws:add(module=org.jboss.teiid.translator.ws)
+/profile=ha/subsystem=teiid/translator=salesforce:add(module=org.jboss.teiid.translator.salesforce)
+/profile=ha/subsystem=teiid/translator=hive:add(module=org.jboss.teiid.translator.hive)
+
+/profile=ha/subsystem=datasources/jdbc-driver=teiid:add(driver-name=teiid, driver-module-name=org.jboss.teiid.client, driver-class-name=org.teiid.jdbc.TeiidDriver, driver-xa-datasource-class-name=org.teiid.jdbc.TeiidDataSource)
+/profile=ha/subsystem=datasources/jdbc-driver=teiid-local:add(driver-name=teiid-local, driver-module-name=org.jboss.teiid, driver-class-name=org.teiid.jdbc.TeiidDriver, driver-xa-datasource-class-name=org.teiid.jdbc.TeiidDataSource)
+
+deploy --server-groups=main-server-group ../standalone/deployments/teiid-connector-file.rar
+deploy --server-groups=main-server-group ../standalone/deployments/teiid-connector-ldap.rar
+deploy --server-groups=main-server-group ../standalone/deployments/teiid-connector-salesforce.rar
+deploy --server-groups=main-server-group ../standalone/deployments/teiid-connector-ws.rar
+
+/server-group=main-server-group:restart-servers
\ No newline at end of file
12 years, 8 months
teiid SVN: r3993 - in trunk: engine/src/main/java/org/teiid/query/metadata and 4 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2012-04-11 13:45:00 -0400 (Wed, 11 Apr 2012)
New Revision: 3993
Modified:
trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java
trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
Log:
TEIID-1998: When the translator is deployed as JAR (instead of JAR), there is implicit module, however it can not be accessed by the named module, thus it was an issue. Captured the class loader of the deployment, and also when defined with module such that the loading of the translator only refers to class loader not a module.
Modified: trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/engine/src/main/java/org/teiid/query/QueryPlugin.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -641,6 +641,7 @@
TEIID31093,
TEIID31094,
TEIID31095,
- TEIID31096
+ TEIID31096,
+ TEIID31097
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/NativeMetadataRepository.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -42,6 +42,10 @@
throw new TranslatorException(QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30591, factory.getName()));
}
+ if (connectionFactory == null) {
+ throw new TranslatorException(QueryPlugin.Event.TEIID31097, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31097));
+ }
+
Object connection = executionFactory.getConnection(connectionFactory, null);
Object unwrapped = null;
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2012-04-11 17:45:00 UTC (rev 3993)
@@ -921,6 +921,7 @@
failed_to_cache=Failed to store the result set contents to disk.
TEIID30480=Failed to unwrap the source connection.
TEIID30481=Failed to find the Connection Factory with JNDI name {0}. Please check the name or deploy the Connection Factory with specified name.
+TEIID31097=Connection Factory (no data source found) provided is null; Can not proceed with metadata load.
TEIID30256=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs and no compensating action can be taken as the table lacks a unique key or the source does not support equality predicates.
TEIID30254=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs that cannot be simplified into a compensating action.
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidAdd.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -220,7 +220,7 @@
newControllers.add(target.addService(TeiidServiceNames.VDB_REPO, vdbRepositoryService).install());
// VDB Status manager
- final VDBStatusCheckerExecutorService statusChecker = new VDBStatusCheckerExecutorService(vdbRepository);
+ final VDBStatusCheckerExecutorService statusChecker = new VDBStatusCheckerExecutorService();
statusChecker.setTranslatorRepository(translatorRepo);
ValueService<VDBStatusChecker> statusService = new ValueService<VDBStatusChecker>(new org.jboss.msc.value.Value<VDBStatusChecker>() {
@Override
@@ -230,6 +230,7 @@
});
ServiceBuilder<VDBStatusChecker> statusBuilder = target.addService(TeiidServiceNames.VDB_STATUS_CHECKER, statusService);
statusBuilder.addDependency(TeiidServiceNames.executorServiceName(asyncThreadPoolName), Executor.class, statusChecker.executorInjector);
+ statusBuilder.addDependency(TeiidServiceNames.VDB_REPO, VDBRepository.class, statusChecker.vdbRepoInjector);
newControllers.add(statusBuilder.install());
// System VDB Service
@@ -557,14 +558,16 @@
static class VDBStatusCheckerExecutorService extends VDBStatusChecker{
final InjectedValue<Executor> executorInjector = new InjectedValue<Executor>();
+ final InjectedValue<VDBRepository> vdbRepoInjector = new InjectedValue<VDBRepository>();
- public VDBStatusCheckerExecutorService(VDBRepository vdbRepository) {
- super(vdbRepository);
- }
-
@Override
public Executor getExecutor() {
return this.executorInjector.getValue();
- }
+ }
+
+ @Override
+ public VDBRepository getVDBRepository() {
+ return this.vdbRepoInjector.getValue();
+ }
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/TeiidOperationHandler.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -826,7 +826,7 @@
}
}
- private SessionMetadata createTemporarySession(final String vdbName, final int version, final String userName) {
+ private SessionMetadata createTemporarySession(final String vdbName, final int version, final String userName) throws OperationFailedException{
long creationTime = System.currentTimeMillis();
@@ -840,7 +840,11 @@
newSession.setVDBName(vdbName);
newSession.setVDBVersion(version);
- newSession.setVdb(this.vdbRepo.getVDB(vdbName, version));
+ VDBMetaData vdb = this.vdbRepo.getVDB(vdbName, version);
+ if (vdb == null) {
+ throw new OperationFailedException(new ModelNode().set(IntegrationPlugin.Util.getString("wrong_vdb")));//$NON-NLS-1$
+ }
+ newSession.setVdb(vdb);
return newSession;
}
}
@@ -906,6 +910,9 @@
ModelNode result = context.getResult();
List<VDBMetaData> vdbs = repo.getVDBs();
for (VDBMetaData vdb:vdbs) {
+ if (vdb == null) {
+ continue; // when vdb deployed but metadata is still being loaded this reports as null
+ }
VDBMetadataMapper.INSTANCE.wrap(vdb, result.add());
}
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -171,12 +171,12 @@
vdbService.addDependency(TeiidServiceNames.translatorServiceName(type));
}
- vdbService.addDependency(TeiidServiceNames.VDB_REPO, VDBRepository.class, vdb.getVDBRepositoryInjector());
- vdbService.addDependency(TeiidServiceNames.TRANSLATOR_REPO, TranslatorRepository.class, vdb.getTranslatorRepositoryInjector());
- vdbService.addDependency(TeiidServiceNames.executorServiceName(this.asyncThreadPoolName), Executor.class, vdb.getExecutorInjector());
- vdbService.addDependency(TeiidServiceNames.OBJECT_SERIALIZER, ObjectSerializer.class, vdb.getSerializerInjector());
- vdbService.addDependency(TeiidServiceNames.BUFFER_MGR, BufferManager.class, vdb.getBufferManagerInjector());
- vdbService.addDependency(DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, vdb.getObjectReplicatorInjector());
+ vdbService.addDependency(TeiidServiceNames.VDB_REPO, VDBRepository.class, vdb.vdbRepositoryInjector);
+ vdbService.addDependency(TeiidServiceNames.TRANSLATOR_REPO, TranslatorRepository.class, vdb.translatorRepositoryInjector);
+ vdbService.addDependency(TeiidServiceNames.executorServiceName(this.asyncThreadPoolName), Executor.class, vdb.executorInjector);
+ vdbService.addDependency(TeiidServiceNames.OBJECT_SERIALIZER, ObjectSerializer.class, vdb.serializerInjector);
+ vdbService.addDependency(TeiidServiceNames.BUFFER_MGR, BufferManager.class, vdb.bufferManagerInjector);
+ vdbService.addDependency(DependencyType.OPTIONAL, TeiidServiceNames.OBJECT_REPLICATOR, ObjectReplicator.class, vdb.objectReplicatorInjector);
vdbService.setInitialMode(Mode.PASSIVE).install();
ServiceController<?> scMain = deploymentUnit.getServiceRegistry().getService(deploymentUnit.getServiceName().append("contents")); //$NON-NLS-1$
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -35,9 +35,6 @@
import javax.xml.stream.XMLStreamException;
-import org.jboss.modules.Module;
-import org.jboss.modules.ModuleIdentifier;
-import org.jboss.modules.ModuleLoadException;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
@@ -82,12 +79,12 @@
class VDBService implements Service<VDBMetaData> {
private VDBMetaData vdb;
- private final InjectedValue<VDBRepository> vdbRepositoryInjector = new InjectedValue<VDBRepository>();
- private final InjectedValue<TranslatorRepository> translatorRepositoryInjector = new InjectedValue<TranslatorRepository>();
- private final InjectedValue<Executor> executorInjector = new InjectedValue<Executor>();
- private final InjectedValue<ObjectSerializer> serializerInjector = new InjectedValue<ObjectSerializer>();
- private final InjectedValue<BufferManager> bufferManagerInjector = new InjectedValue<BufferManager>();
- private final InjectedValue<ObjectReplicator> objectReplicatorInjector = new InjectedValue<ObjectReplicator>();
+ protected final InjectedValue<VDBRepository> vdbRepositoryInjector = new InjectedValue<VDBRepository>();
+ protected final InjectedValue<TranslatorRepository> translatorRepositoryInjector = new InjectedValue<TranslatorRepository>();
+ protected final InjectedValue<Executor> executorInjector = new InjectedValue<Executor>();
+ protected final InjectedValue<ObjectSerializer> serializerInjector = new InjectedValue<ObjectSerializer>();
+ protected final InjectedValue<BufferManager> bufferManagerInjector = new InjectedValue<BufferManager>();
+ protected final InjectedValue<ObjectReplicator> objectReplicatorInjector = new InjectedValue<ObjectReplicator>();
private VDBLifeCycleListener vdbListener;
public VDBService(VDBMetaData metadata) {
@@ -140,9 +137,9 @@
}
// add object replication to temp/matview tables
GlobalTableStore gts = new GlobalTableStoreImpl(getBuffermanager(), vdb.getVDB().getAttachment(TransformationMetadata.class));
- if (getObjectReplicatorInjector().getValue() != null) {
+ if (objectReplicatorInjector.getValue() != null) {
try {
- gts = getObjectReplicatorInjector().getValue().replicate(name + version, GlobalTableStore.class, gts, 300000);
+ gts = objectReplicatorInjector.getValue().replicate(name + version, GlobalTableStore.class, gts, 300000);
vdb.getVDB().addAttchment(GlobalTableStore.class, gts);
} catch (Exception e) {
LogManager.logError(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50023, gts));
@@ -187,9 +184,9 @@
@Override
public void stop(StopContext context) {
// stop object replication
- if (getObjectReplicatorInjector().getValue() != null) {
+ if (this.objectReplicatorInjector.getValue() != null) {
GlobalTableStore gts = vdb.getAttachment(GlobalTableStore.class);
- getObjectReplicatorInjector().getValue().stop(gts);
+ this.objectReplicatorInjector.getValue().stop(gts);
}
getVDBRepository().removeListener(this.vdbListener);
getVDBRepository().removeVDB(this.vdb.getName(), this.vdb.getVersion());
@@ -253,15 +250,9 @@
ExecutionFactory<Object, Object> ef = map.get(translator);
if ( ef == null) {
- ClassLoader classloader = Thread.currentThread().getContextClassLoader();
- if (translator.getModuleName() != null) {
- try {
- final ModuleIdentifier moduleId = ModuleIdentifier.create(translator.getModuleName());
- final Module module = Module.getCallerModuleLoader().loadModule(moduleId);
- classloader = module.getClassLoader();
- } catch (ModuleLoadException e) {
- throw new TeiidException(IntegrationPlugin.Event.TEIID50057, e, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50057, translator.getModuleName(), translator.getName()));
- }
+ ClassLoader classloader = translator.getAttachment(ClassLoader.class);
+ if (classloader == null) {
+ classloader = Thread.currentThread().getContextClassLoader();
}
ef = TranslatorUtil.buildExecutionFactory(translator, classloader);
@@ -406,50 +397,26 @@
}
}
- public InjectedValue<VDBRepository> getVDBRepositoryInjector(){
- return this.vdbRepositoryInjector;
- }
-
private VDBRepository getVDBRepository() {
return vdbRepositoryInjector.getValue();
}
- public InjectedValue<TranslatorRepository> getTranslatorRepositoryInjector(){
- return this.translatorRepositoryInjector;
- }
-
private TranslatorRepository getTranslatorRepository() {
return this.translatorRepositoryInjector.getValue();
}
- public InjectedValue<Executor> getExecutorInjector(){
- return this.executorInjector;
- }
-
private Executor getExecutor() {
return this.executorInjector.getValue();
}
- public InjectedValue<ObjectSerializer> getSerializerInjector() {
- return serializerInjector;
- }
-
private ObjectSerializer getSerializer() {
return serializerInjector.getValue();
}
- public InjectedValue<BufferManager> getBufferManagerInjector() {
- return bufferManagerInjector;
- }
-
private BufferManager getBuffermanager() {
- return getBufferManagerInjector().getValue();
+ return bufferManagerInjector.getValue();
}
- public InjectedValue<ObjectReplicator> getObjectReplicatorInjector() {
- return objectReplicatorInjector;
- }
-
public void addDataRole(String policyName, String mappedRole) throws AdminProcessingException{
DataPolicyMetadata policy = vdb.getDataPolicy(policyName);
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2012-04-11 17:45:00 UTC (rev 3993)
@@ -80,6 +80,7 @@
TEIID50075=No "path" information found to load the FUNCTION model {0}; FUNCTION model must have path information.
TEIID50076=For {0}.{1} VDB, recursive delegation {2} found.
TEIID50077=The parent translator type "{0}" was not found in configuration "{1}"
+wrong_vdb= Wrong VDB name and/or version supplied, or VDB is not active, or not available.
# subsystem description
teiid.add = Add the Teiid Subsystem
Modified: trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -158,7 +158,7 @@
return false;
}
- private VDBMetaData buildVDB() {
+ VDBMetaData buildVDB() {
if (this.children == null || this.children.isEmpty()) {
this.vdb.addAttchment(ConnectorManagerRepository.class, this.cmr);
@@ -343,4 +343,8 @@
public void setMetaloadFinished(boolean flag) {
this.metadataloadFinished = flag;
}
+
+ public boolean isMetadataloadFinished() {
+ return this.metadataloadFinished;
+ }
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -108,6 +108,23 @@
}
return vdbs;
}
+
+ /**
+ * This returns the all the VDBS that loaded and still loading or stalled due to data source unavailability.
+ * @return
+ */
+ public List<VDBMetaData> getAllDeployedVDBs(){
+ ArrayList<VDBMetaData> vdbs = new ArrayList<VDBMetaData>();
+ for(CompositeVDB cVDB:this.vdbRepo.values()) {
+ if (!cVDB.isMetadataloadFinished()) {
+ vdbs.add(cVDB.buildVDB());
+ }
+ else {
+ vdbs.add(cVDB.getVDB());
+ }
+ }
+ return vdbs;
+ }
protected VDBKey vdbId(VDBMetaData vdb) {
return new VDBKey(vdb.getName(), vdb.getVersion());
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-04-11 15:38:10 UTC (rev 3992)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStatusChecker.java 2012-04-11 17:45:00 UTC (rev 3993)
@@ -42,13 +42,8 @@
public abstract class VDBStatusChecker {
private static final String JAVA_CONTEXT = "java:/"; //$NON-NLS-1$
- private VDBRepository vdbRepository;
private TranslatorRepository translatorRepository;
- public VDBStatusChecker(VDBRepository vdbRepository) {
- this.vdbRepository = vdbRepository;
- }
-
public void translatorAdded(String translatorName) {
resourceAdded(translatorName, true);
}
@@ -78,7 +73,7 @@
dsName = dsName.substring(5);
}
- VDBMetaData vdb = this.vdbRepository.getVDB(vdbName, vdbVersion);
+ VDBMetaData vdb = getVDBRepository().getVDB(vdbName, vdbVersion);
ModelMetaData model = vdb.getModel(modelName);
synchronized (vdb) {
@@ -123,12 +118,11 @@
}
}
- public void setVDBRepository(VDBRepository repo) {
- this.vdbRepository = repo;
- }
-
public void resourceAdded(String resourceName, boolean translator) {
- for (VDBMetaData vdb:this.vdbRepository.getVDBs()) {
+ for (VDBMetaData vdb:getVDBRepository().getAllDeployedVDBs()) {
+ if (vdb == null) {
+ continue;
+ }
if (vdb.getStatus() == VDB.Status.ACTIVE || vdb.isPreview()) {
continue;
}
@@ -184,7 +178,10 @@
}
public void resourceRemoved(String resourceName, boolean translator) {
- for (VDBMetaData vdb:this.vdbRepository.getVDBs()) {
+ for (VDBMetaData vdb:getVDBRepository().getAllDeployedVDBs()) {
+ if (vdb == null) {
+ continue;
+ }
if (vdb.isPreview()) {
continue;
}
@@ -232,6 +229,8 @@
public abstract Executor getExecutor();
+ public abstract VDBRepository getVDBRepository();
+
public void setTranslatorRepository(TranslatorRepository repo) {
this.translatorRepository = repo;
}
12 years, 8 months
teiid SVN: r3992 - in trunk: engine/src/main/java/org/teiid/query/parser and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-11 11:38:10 -0400 (Wed, 11 Apr 2012)
New Revision: 3992
Modified:
trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
Log:
TEIID-1280 adding namespace prefix resolution
Modified: trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java 2012-04-11 15:17:17 UTC (rev 3991)
+++ trunk/api/src/main/java/org/teiid/metadata/MetadataFactory.java 2012-04-11 15:38:10 UTC (rev 3992)
@@ -385,4 +385,8 @@
public int getVdbVersion() {
return vdbVersion;
}
+
+ public Map<String, String> getNamespaces() {
+ return namespaces;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-04-11 15:17:17 UTC (rev 3991)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-04-11 15:38:10 UTC (rev 3992)
@@ -572,6 +572,19 @@
}
}
+ static String resolvePropertyKey(MetadataFactory factory, String key) {
+ int index = key.indexOf(':');
+ if (index > 0 && index < key.length() - 1) {
+ String prefix = key.substring(0, index);
+ String uri = factory.getNamespaces().get(prefix);
+ if (uri != null) {
+ key = '{' +uri + '}' + key.substring(index + 1, key.length());
+ }
+ //TODO warnings or errors if not resolvable
+ }
+ return key;
+ }
+
static class ParsedDataType{
String type;
Integer length;
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-04-11 15:17:17 UTC (rev 3991)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-04-11 15:38:10 UTC (rev 3992)
@@ -3855,11 +3855,11 @@
}
{
<XMLNAMESPACES> <LPAREN>
- item = namespaceItem(info)
+ item = namespaceItem()
{
namespaces.add(item);
}
- (<COMMA> item = namespaceItem(info)
+ (<COMMA> item = namespaceItem()
{
namespaces.add(item);
}
@@ -3870,7 +3870,7 @@
}
}
-XMLNamespaces.NamespaceItem namespaceItem(ParseInfo info) :
+XMLNamespaces.NamespaceItem namespaceItem() :
{
String uri = null;
String prefix = null;
@@ -4094,13 +4094,12 @@
void createNameSpace(MetadataFactory factory) :
{
- String uri = null;
- String prefix = null;
+ XMLNamespaces.NamespaceItem item = null;
}
{
- <SET> nonReserved ("NAMESPACE") uri = stringVal() <AS> prefix = stringVal()
+ <SET> nonReserved ("NAMESPACE") item = namespaceItem()
{
- factory.addNamespace(prefix, uri);
+ factory.addNamespace(item.getPrefix(), item.getUri());
}
}
@@ -4137,7 +4136,7 @@
<RETURNS> (readProcedureReturn(factory, proc) | returnDataType = parseDataType())
- [ optionsClause(proc)
+ [ optionsClause(proc, factory)
{
setProcedureOptions(proc);
}
@@ -4259,7 +4258,7 @@
)*
]
<RPAREN>]
- [optionsClause(table)
+ [optionsClause(table, factory)
{
setTableOptions(table);
}
@@ -4434,7 +4433,7 @@
|(<PRIMARY> nonReserved("KEY") { pk = true; })
])
[<DEFAULT_KEYWORD> defalt = stringVal()]
- [optionsClause(column)
+ [optionsClause(column, factory)
{
setColumnOptions(column);
}
@@ -4467,16 +4466,16 @@
}
}
-void optionsClause(AbstractMetadataRecord record) :
+void optionsClause(AbstractMetadataRecord record, MetadataFactory factory) :
{
}
{
<OPTIONS> <LPAREN>
- readOption(record) (<COMMA> readOption(record))*
+ optionPair(record, factory) (<COMMA> optionPair(record, factory))*
<RPAREN>
}
-void readOption(AbstractMetadataRecord record) :
+void optionPair(AbstractMetadataRecord record, MetadataFactory factory) :
{
String value = null;
String key = null;
@@ -4493,6 +4492,7 @@
if (t != null) {
value = t.image;
}
+ key = resolvePropertyKey(factory, key);
record.setProperty(key, value);
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-04-11 15:17:17 UTC (rev 3991)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-04-11 15:38:10 UTC (rev 3992)
@@ -569,7 +569,7 @@
@Test
public void testNamespace() throws Exception {
- String ddl = "set namespace 'http://teiid.org' AS 'teiid'";
+ String ddl = "set namespace 'http://teiid.org' AS teiid";
MetadataStore mds = new MetadataStore();
MetadataFactory mf = new MetadataFactory(null, 1, "model", getDataTypes(), new Properties(), null);
@@ -601,4 +601,11 @@
datatypes.put("decimal", datatypes.get(DataTypeManager.DefaultDataTypes.BIG_DECIMAL));
return datatypes;
}
+
+ @Test public void testKeyResolve() {
+ MetadataFactory mf = new MetadataFactory(null, 1, "foo", getDataTypes(), new Properties(), null);
+ mf.addNamespace("x", "http://x");
+ assertEquals("{http://x}z", SQLParserUtil.resolvePropertyKey(mf, "x:z"));
+ assertEquals("y:z", SQLParserUtil.resolvePropertyKey(mf, "y:z"));
+ }
}
12 years, 8 months
teiid SVN: r3991 - in trunk: api/src/main/java/org/teiid/metadata and 7 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-11 11:17:17 -0400 (Wed, 11 Apr 2012)
New Revision: 3991
Removed:
trunk/api/src/main/javacc/
Modified:
trunk/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java
trunk/api/src/main/java/org/teiid/metadata/FunctionMethod.java
trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java
trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java
trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
Log:
TEIID-1560 TEIID-1280 allowing user defined aggregates to be specified via ddl and ddl changes to be consistent with extension metadata
Modified: trunk/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/api/src/main/java/org/teiid/metadata/AbstractMetadataRecord.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -22,10 +22,12 @@
package org.teiid.metadata;
+import java.io.IOException;
import java.io.Serializable;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicLong;
import org.teiid.core.types.DataTypeManager;
@@ -56,7 +58,7 @@
private String nameInSource;
- private LinkedHashMap<String, String> properties;
+ private Map<String, String> properties;
private String annotation;
public static final String RELATIONAL_URI = "{http://www.teiid.org/ext/relational/2012}"; //$NON-NLS-1$
@@ -159,13 +161,20 @@
return this.properties.remove(key);
}
if (this.properties == null) {
- this.properties = new LinkedHashMap<String, String>();
+ this.properties = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
}
return this.properties.put(DataTypeManager.getCanonicalString(key), DataTypeManager.getCanonicalString(value));
}
- public void setProperties(LinkedHashMap<String, String> properties) {
- this.properties = properties;
+ public void setProperties(Map<String, String> properties) {
+ if (this.properties == null) {
+ this.properties = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
+ } else {
+ this.properties.clear();
+ }
+ if (properties != null) {
+ this.properties.putAll(properties);
+ }
}
public String getAnnotation() {
@@ -192,6 +201,13 @@
return EquivalenceUtil.areEqual(this.getUUID(), other.getUUID());
}
+
+ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
+ in.defaultReadObject();
+ if (this.properties != null && !(this.properties instanceof TreeMap<?, ?>)) {
+ this.setProperties(this.getProperties());
+ }
+ }
public int hashCode() {
return getUUID().hashCode();
Modified: trunk/api/src/main/java/org/teiid/metadata/FunctionMethod.java
===================================================================
--- trunk/api/src/main/java/org/teiid/metadata/FunctionMethod.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/api/src/main/java/org/teiid/metadata/FunctionMethod.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -493,4 +493,34 @@
public void setAggregateAttributes(AggregateAttributes aggregateAttributes) {
this.aggregateAttributes = aggregateAttributes;
}
+
+ public static void convertExtensionMetadata(Procedure procedureRecord,
+ FunctionMethod function) {
+ String deterministic = procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "deterministic", true); //$NON-NLS-1$
+ boolean nullOnNull = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "null-on-null", true)); //$NON-NLS-1$
+ boolean varargs = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "varargs", true)); //$NON-NLS-1$
+ boolean aggregate = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "aggregate", true)); //$NON-NLS-1$
+ if (deterministic != null) {
+ function.setDeterminism(Boolean.valueOf(deterministic)?Determinism.DETERMINISTIC:Determinism.NONDETERMINISTIC);
+ }
+ function.setNullOnNull(nullOnNull);
+ if (varargs && !function.getInputParameters().isEmpty()) {
+ function.getInputParameters().get(function.getInputParameterCount() - 1).setVarArg(varargs);
+ }
+ if (aggregate) {
+ boolean analytic = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "analytic", true)); //$NON-NLS-1$
+ boolean allowsOrderBy = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "allows-orderby", true)); //$NON-NLS-1$
+ boolean usesDistinctRows = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "uses-distinct-rows", true)); //$NON-NLS-1$
+ boolean allowsDistinct = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "allows-distinct", true)); //$NON-NLS-1$
+ boolean decomposable = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "decomposable", true)); //$NON-NLS-1$
+ AggregateAttributes aa = new AggregateAttributes();
+ aa.setAnalytic(analytic);
+ aa.setAllowsOrderBy(allowsOrderBy);
+ aa.setUsesDistinctRows(usesDistinctRows);
+ aa.setAllowsDistinct(allowsDistinct);
+ aa.setDecomposable(decomposable);
+ function.setAggregateAttributes(aa);
+ }
+ }
+
}
Modified: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-04-11 15:17:17 UTC (rev 3991)
@@ -47,7 +47,7 @@
<LI><B>VARBINARY type support</B> - the Teiid VARBINARY type can now be used to support source BINARY and VARBINARY types.
<LI><B>Greenplum Translator</B> - for use with the Greenplum database.
<LI><B>Enhanced parse/format pushdown</B> - added more built-in support and extension points for parse/format function pushdown. Added parse/format timestamp handling for SQLServer, Sybase, Oracle, and PostgreSQL.
- <LI><B>User Defined Aggregates</B> - user defined aggregate functions can be defined via extension metadata or connector metadata.
+ <LI><B>User Defined Aggregates</B> - user defined aggregate functions can be defined via extension metadata, DDL, or connector metadata.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
@@ -73,7 +73,8 @@
<li>Unaliased derived columns in the SELECT clause have different default names than prior releases. The name will be exprX where X is the SELECT clause position.
<li>The translator API facilities for iterator/bulk updates were combined and updated. Multi-valued literals were replaced by the Parameter class with an associated value iterator
available on the BatchedCommand. The IteratorValueSource class was also removed.
- <li>varbinary was added as a reserved word.
+ <li>VARBINARY, OPTIONS, and OUT were added as reserved words.
+ <li>AbstractMetadataRecord and its sub-classes use a case-insensitive map for properties rather than a LinkedHashMap. Thus, property key lookups are now case-insensitive.
</ul>
<h4>from 7.7</h4>
Modified: trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -34,6 +34,7 @@
import org.teiid.core.util.PropertiesUtils;
import org.teiid.core.util.StringUtil;
import org.teiid.language.SQLConstants.Reserved;
+import org.teiid.metadata.AbstractMetadataRecord;
import org.teiid.metadata.Column;
import org.teiid.metadata.FunctionMethod;
import org.teiid.metadata.FunctionParameter;
@@ -41,19 +42,11 @@
import org.teiid.metadata.Procedure;
import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.Table;
+import org.teiid.metadata.Column.SearchType;
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionMethods;
-import org.teiid.query.sql.lang.AlterTrigger;
-import org.teiid.query.sql.lang.CacheHint;
-import org.teiid.query.sql.lang.CompareCriteria;
+import org.teiid.query.sql.lang.*;
import org.teiid.query.sql.lang.ExistsCriteria.SubqueryHint;
-import org.teiid.query.sql.lang.FromClause;
-import org.teiid.query.sql.lang.JoinType;
-import org.teiid.query.sql.lang.Limit;
-import org.teiid.query.sql.lang.Option;
-import org.teiid.query.sql.lang.QueryCommand;
-import org.teiid.query.sql.lang.SetQuery;
-import org.teiid.query.sql.lang.SourceHint;
import org.teiid.query.sql.proc.Block;
import org.teiid.query.sql.proc.Statement;
import org.teiid.query.sql.symbol.GroupSymbol;
@@ -361,110 +354,95 @@
return new Block(stmt);
}
- void setColumnOption(Column c, String k, String v){
- int index = k.indexOf(':');
- if ( index != -1) {
- k = k.substring(index+1);
+ void setColumnOptions(Column c){
+ Map<String, String> props = c.getProperties();
+ setCommonProperties(c, props);
+
+ String v = props.remove("CASE_SENSITIVE"); //$NON-NLS-1$
+ c.setCaseSensitive(isTrue(v));
+
+ v = props.remove("SELECTABLE"); //$NON-NLS-1$
+ c.setSelectable(isTrue(v));
+
+ v = props.remove("UPDATABLE"); //$NON-NLS-1$
+ c.setUpdatable(isTrue(v));
+
+ v = props.remove("SIGNED"); //$NON-NLS-1$
+ c.setSigned(isTrue(v));
+
+ v = props.remove("CURRENCY"); //$NON-NLS-1$
+ c.setSigned(isTrue(v));
+
+ v = props.remove("FIXED_LENGTH"); //$NON-NLS-1$
+ c.setFixedLength(isTrue(v));
+
+ v = props.remove("SEARCHABLE"); //$NON-NLS-1$
+ if (v != null) {
+ c.setSearchType(SearchType.valueOf(v.toUpperCase()));
}
- if(k.equalsIgnoreCase("UUID")) { //$NON-NLS-1$
- c.setUUID(v);
+
+ v = props.remove("MIN_VALUE"); //$NON-NLS-1$
+ c.setMinimumValue(v);
+
+ v = props.remove("MAX_VALUE"); //$NON-NLS-1$
+ c.setMaximumValue(v);
+
+ v = props.remove("CHAR_OCTET_LENGTH"); //$NON-NLS-1$
+ if (v != null) {
+ c.setCharOctetLength(Integer.parseInt(v));
}
- else if(k.equalsIgnoreCase("NAMEINSOURCE")) { //$NON-NLS-1$
- c.setNameInSource(v);
- }
- else if(k.equalsIgnoreCase("CASE_SENSITIVE")) { //$NON-NLS-1$
- c.setCaseSensitive(isTrue(v));
- }
- else if(k.equalsIgnoreCase("SELECTABLE")) { //$NON-NLS-1$
- c.setSelectable(isTrue(v));
- }
- else if(k.equalsIgnoreCase("UPDATABLE")) { //$NON-NLS-1$
- c.setUpdatable(isTrue(v));
- }
- else if(k.equalsIgnoreCase("SIGNED")) { //$NON-NLS-1$
- c.setSigned(isTrue(v));
- }
- else if(k.equalsIgnoreCase("CURRENCY")) { //$NON-NLS-1$
- c.setSigned(isTrue(v));
- }
- else if(k.equalsIgnoreCase("FIXED_LENGTH")) { //$NON-NLS-1$
- c.setFixedLength(isTrue(v));
- }
- else if(k.equalsIgnoreCase("SEARCHABLE")) { //$NON-NLS-1$
- //'YES|NO|LIKE_ONLY|ALL_EXCEPT_LIKE'
- if (v.equalsIgnoreCase("YES")){//$NON-NLS-1$
- c.setSearchType(Column.SearchType.Searchable);
- }
- else if (v.equalsIgnoreCase("NO")){//$NON-NLS-1$
- c.setSearchType(Column.SearchType.Unsearchable);
- }
- else if (v.equalsIgnoreCase("LIKE_ONLY")){ //$NON-NLS-1$
- c.setSearchType(Column.SearchType.Like_Only);
- }
- else if (v.equalsIgnoreCase("ALL_EXCEPT_LIKE")){ //$NON-NLS-1$
- c.setSearchType(Column.SearchType.All_Except_Like);
- }
- }
- else if(k.equalsIgnoreCase("MIN_VALUE")) { //$NON-NLS-1$
- c.setMinimumValue(v);
- }
- else if(k.equalsIgnoreCase("MAX_VALUE")) { //$NON-NLS-1$
- c.setMaximumValue(v);
- }
- else if(k.equalsIgnoreCase("CHAR_OCTET_LENGTH")) { //$NON-NLS-1$
- c.setCharOctetLength(Integer.parseInt(v));
- }
- else if(k.equalsIgnoreCase("ANNOTATION")) { //$NON-NLS-1$
- c.setAnnotation(v);
- }
- else if(k.equalsIgnoreCase("NATIVE_TYPE")) { //$NON-NLS-1$
- c.setNativeType(v);
- }
- else if(k.equalsIgnoreCase("RADIX")) { //$NON-NLS-1$
- c.setRadix(Integer.parseInt(v));
- }
- else if(k.equalsIgnoreCase("NULL_VALUE_COUNT")) { //$NON-NLS-1$
- c.setNullValues(Integer.parseInt(v));
- }
- else if(k.equalsIgnoreCase("DISTINCT_VALUES")) { //$NON-NLS-1$
- c.setDistinctValues(Integer.parseInt(v));
- }
- else {
- c.setProperty(k, v);
- }
- }
-
- void setTableOption(Table table, String k, String value) {
- int index = k.indexOf(':');
- if ( index != -1) {
- k = k.substring(index+1);
+
+ v = props.remove("NATIVE_TYPE"); //$NON-NLS-1$
+ c.setNativeType(v);
+
+ v = props.remove("RADIX"); //$NON-NLS-1$
+ if (v != null) {
+ c.setRadix(Integer.parseInt(v));
}
- if(k.equalsIgnoreCase("UUID")) { //$NON-NLS-1$
- table.setUUID(value);
+
+ v = props.remove("NULL_VALUE_COUNT"); //$NON-NLS-1$
+ if (v != null) {
+ c.setNullValues(Integer.parseInt(v));
}
- else if(k.equalsIgnoreCase("NAMEINSOURCE")) { //$NON-NLS-1$
- table.setNameInSource(value);
+
+ v = props.remove("DISTINCT_VALUES"); //$NON-NLS-1$
+ if (v != null) {
+ c.setDistinctValues(Integer.parseInt(v));
}
- else if(k.equalsIgnoreCase("MATERIALIZED")) { //$NON-NLS-1$
- table.setMaterialized(isTrue(value));
- }
- else if(k.equalsIgnoreCase("MATERIALIZED_TABLE")) { //$NON-NLS-1$
+ }
+
+ private void setCommonProperties(AbstractMetadataRecord c, Map<String, String> props) {
+ String v = props.remove("UUID"); //$NON-NLS-1$
+ c.setUUID(v);
+
+ v = props.remove("ANNOTATION"); //$NON-NLS-1$
+ c.setAnnotation(v);
+
+ v = props.remove("NAMEINSOURCE"); //$NON-NLS-1$
+ c.setNameInSource(v);
+ }
+
+ void setTableOptions(Table table) {
+ Map<String, String> props = table.getProperties();
+ setCommonProperties(table, props);
+
+ String value = props.remove("MATERIALIZED"); //$NON-NLS-1$
+ table.setMaterialized(isTrue(value));
+
+ value = props.remove("MATERIALIZED_TABLE"); //$NON-NLS-1$
+ if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
- else if(k.equalsIgnoreCase("UPDATABLE")) { //$NON-NLS-1$
- table.setSupportsUpdate(isTrue(value));
- }
- else if(k.equalsIgnoreCase("ANNOTATION")) { //$NON-NLS-1$
- table.setAnnotation(value);
- }
- else if(k.equalsIgnoreCase("CARDINALITY")) { //$NON-NLS-1$
+
+ value = props.remove("UPDATABLE"); //$NON-NLS-1$
+ table.setSupportsUpdate(isTrue(value));
+
+ value = props.remove("CARDINALITY"); //$NON-NLS-1$
+ if (value != null) {
table.setCardinality(Integer.parseInt(value));
}
- else {
- table.setProperty(k, value);
- }
}
static void replaceProceduresWithFunctions(MetadataFactory factory) throws ParseException {
@@ -508,28 +486,28 @@
method.setUUID(proc.getUUID());
Map<String, String> props = proc.getProperties();
+
+ String value = props.remove("CATEGORY"); //$NON-NLS-1$
+ method.setCategory(value);
+
+ value = props.remove("DETERMINISM"); //$NON-NLS-1$
+ if (value != null) {
+ method.setDeterminism(FunctionMethod.Determinism.valueOf(value.toUpperCase()));
+ }
+
+ value = props.remove("JAVA_CLASS"); //$NON-NLS-1$
+ method.setInvocationClass(value);
+
+ value = props.remove("JAVA_METHOD"); //$NON-NLS-1$
+ method.setInvocationMethod(value);
+
for (String key:props.keySet()) {
- String value = props.get(key);
- if(key.equalsIgnoreCase("CATEGORY")) { //$NON-NLS-1$
- method.setCategory(value);
- }
- else if(key.equalsIgnoreCase("DETERMINISTIC")) { //$NON-NLS-1$
- method.setDeterminism(FunctionMethod.Determinism.valueOf(value.toUpperCase()));
- }
- else if(key.equalsIgnoreCase("NULLONNULL")) { //$NON-NLS-1$
- method.setNullOnNull(isTrue(value));
- }
- else if(key.equalsIgnoreCase("JAVA_CLASS")) { //$NON-NLS-1$
- method.setInvocationClass(value);
- }
- else if(key.equalsIgnoreCase("JAVA_METHOD")) { //$NON-NLS-1$
- method.setInvocationMethod(value);
- }
- else {
- method.setProperty(key, value);
- }
+ value = props.get(key);
+ method.setProperty(key, value);
}
+ FunctionMethod.convertExtensionMetadata(proc, method);
+
factory.addFunction(method);
}
@@ -539,31 +517,18 @@
}
}
-
- void setProcedureOption(Procedure proc, String k, String value) {
- int index = k.indexOf(':');
- if ( index != -1) {
- k = k.substring(index+1);
- }
- if(k.equalsIgnoreCase("UUID")) { //$NON-NLS-1$
- proc.setUUID(value);
- }
- else if(k.equalsIgnoreCase("NAMEINSOURCE")) { //$NON-NLS-1$
- proc.setNameInSource(value);
- }
- else if(k.equalsIgnoreCase("ANNOTATION")) { //$NON-NLS-1$
- proc.setAnnotation(value);
- }
- else if(k.equalsIgnoreCase("UPDATECOUNT")) { //$NON-NLS-1$
+ void setProcedureOptions(Procedure proc) {
+ Map<String, String> props = proc.getProperties();
+ setCommonProperties(proc, props);
+
+ String value = props.remove("UPDATECOUNT"); //$NON-NLS-1$
+ if (value != null) {
proc.setUpdateCount(Integer.parseInt(value));
- }
- else {
- proc.setProperty(k, value);
- }
+ }
}
public static boolean isTrue(final String text) {
- return ("YES".equalsIgnoreCase(text)); //$NON-NLS-1$
+ return Boolean.valueOf(text);
}
Column getColumn(String columnName, Table table) {
Modified: trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
===================================================================
--- trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj 2012-04-11 15:17:17 UTC (rev 3991)
@@ -4137,12 +4137,10 @@
<RETURNS> (readProcedureReturn(factory, proc) | returnDataType = parseDataType())
- [<OPTIONS> <LPAREN>
- readProcedureOption(proc)
- (<COMMA>
- readProcedureOption(proc)
- )*
- <RPAREN>
+ [ optionsClause(proc)
+ {
+ setProcedureOptions(proc);
+ }
]
[<AS>
stmt = statement(info)])
@@ -4207,9 +4205,7 @@
} catch (TranslatorException e){
throw new ParseException(e.getMessage());
}
- }
- [nonReserved("VARARG") {param.setVarArg(true);}]
-
+ }
}
void readProcedureReturn(MetadataFactory factory, Procedure proc) :
@@ -4263,12 +4259,10 @@
)*
]
<RPAREN>]
- [<OPTIONS> <LPAREN>
- readTableOption(table)
- (<COMMA>
- readTableOption(table)
- )*
- <RPAREN>
+ [optionsClause(table)
+ {
+ setTableOptions(table);
+ }
]
[<AS> query = queryExpression(new ParseInfo())]
{
@@ -4440,9 +4434,10 @@
|(<PRIMARY> nonReserved("KEY") { pk = true; })
])
[<DEFAULT_KEYWORD> defalt = stringVal()]
- [<OPTIONS> <LPAREN>
- readColumnOption(column) (<COMMA> readColumnOption(column))*
- <RPAREN>
+ [optionsClause(column)
+ {
+ setColumnOptions(column);
+ }
]
{
try{
@@ -4472,66 +4467,32 @@
}
}
-void readColumnOption(Column column) :
+void optionsClause(AbstractMetadataRecord record) :
{
- Token value = null;
- String key = null;
}
{
- key = id()
- ((value = <STRINGVAL>)
- {
- setColumnOption(column, key, normalizeStringLiteral(value.image));
- }
- | (value = <INTEGERVAL>)
- {
- setColumnOption(column, key, value.image);
- }
- | (value = <DECIMALVAL>)
- {
- setColumnOption(column, key, value.image);
- })
+ <OPTIONS> <LPAREN>
+ readOption(record) (<COMMA> readOption(record))*
+ <RPAREN>
}
-void readProcedureOption(Procedure proc) :
+void readOption(AbstractMetadataRecord record) :
{
- Token value = null;
+ String value = null;
String key = null;
- Token tk = null;
+ Token t = null;
}
{
- (key=id()|tk=<DETERMINISTIC>{ key = tk.image;})
- ((value = <STRINGVAL>)
- {
- setProcedureOption(proc, key, normalizeStringLiteral(value.image));
- }
- | (value = <INTEGERVAL>)
- {
- setProcedureOption(proc, key, value.image);
- }
- | (value = <DECIMALVAL>)
- {
- setProcedureOption(proc, key, value.image);
- })
-}
-
-void readTableOption(Table table) :
-{
- Token value = null;
- String key = null;
-}
-{
key = id()
- ((value = <STRINGVAL>)
+ ((value = stringVal())
+ |
+ (t = <INTEGERVAL>)
+ |
+ (t = <DECIMALVAL>))
{
- setTableOption(table, key, normalizeStringLiteral(value.image));
+ if (t != null) {
+ value = t.image;
+ }
+ record.setProperty(key, value);
}
- | (value = <INTEGERVAL>)
- {
- setTableOption(table, key, value.image);
- }
- | (value = <DECIMALVAL>)
- {
- setTableOption(table, key, value.image);
- })
-}
\ No newline at end of file
+}
Modified: trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/engine/src/test/java/org/teiid/query/metadata/TestMetadataValidator.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -252,7 +252,7 @@
public void testExternalMaterializationValidate() throws Exception {
// note here the unique here does not matter for non-existent reference columns, only primary key counted.
String ddl = "CREATE FOREIGN TABLE G1(e1 integer, e2 varchar);";
- String ddl2 = "CREATE VIEW G2 OPTIONS (MATERIALIZED 'YES', MATERIALIZED_TABLE 'pm1.G1') AS SELECT * FROM pm1.G1";
+ String ddl2 = "CREATE VIEW G2 OPTIONS (MATERIALIZED 'true', MATERIALIZED_TABLE 'pm1.G1') AS SELECT * FROM pm1.G1";
buildModel("pm1", true, this.vdb, this.store, ddl);
buildModel("vm1", false, this.vdb, this.store, ddl2);
Modified: trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/engine/src/test/java/org/teiid/query/parser/TestDDLParser.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -52,7 +52,7 @@
"e4 decimal(12,3),\n" +
"e5 integer auto_increment INDEX OPTIONS (UUID 'uuid', NAMEINSOURCE 'nis', SELECTABLE 'NO'),\n" +
"e6 varchar index default 'hello')\n" +
- "OPTIONS (CARDINALITY 12, UUID 'uuid2', UPDATABLE 'yes', FOO 'BAR', ANNOTATION 'Test Table')";
+ "OPTIONS (CARDINALITY 12, UUID 'uuid2', UPDATABLE 'true', FOO 'BAR', ANNOTATION 'Test Table')";
Schema s = helpParse(ddl, "model");
Map<String, Table> tableMap = s.getTables();
@@ -403,8 +403,8 @@
@Test
public void testUDF() throws Exception {
String ddl = "CREATE VIRTUAL FUNCTION SourceFunc(flag boolean, msg varchar) RETURNS varchar " +
- "OPTIONS(CATEGORY 'misc', DETERMINISTIC 'DETERMINISTIC', " +
- "NULLONNULL 'YES', JAVA_CLASS 'foo', JAVA_METHOD 'bar', RANDOM 'any')";
+ "OPTIONS(CATEGORY 'misc', DETERMINISM 'DETERMINISTIC', " +
+ "\"NULL-ON-NULL\" 'true', JAVA_CLASS 'foo', JAVA_METHOD 'bar', RANDOM 'any')";
Schema s = helpParse(ddl, "model");
@@ -428,8 +428,32 @@
}
@Test
+ public void testUDAggregate() throws Exception {
+ String ddl = "CREATE VIRTUAL FUNCTION SourceFunc(flag boolean, msg varchar) RETURNS varchar " +
+ "OPTIONS(CATEGORY 'misc', AGGREGATE 'true', \"allows-distinct\" 'true')";
+
+ Schema s = helpParse(ddl, "model");
+
+ FunctionMethod fm = s.getFunction("SourceFunc");
+ assertNotNull(fm);
+ assertEquals("string", fm.getOutputParameter().getType());
+ assertEquals(FunctionMethod.PushDown.CAN_PUSHDOWN, fm.getPushdown());
+ assertEquals(2, fm.getInputParameterCount());
+ assertEquals("flag", fm.getInputParameters().get(0).getName());
+ assertEquals("boolean", fm.getInputParameters().get(0).getType());
+ assertEquals("msg", fm.getInputParameters().get(1).getName());
+ assertEquals("string", fm.getInputParameters().get(1).getType());
+ assertFalse( fm.getInputParameters().get(1).isVarArg());
+ assertNotNull(fm.getAggregateAttributes());
+ assertTrue(fm.getAggregateAttributes().allowsDistinct());
+ assertEquals(FunctionMethod.Determinism.DETERMINISTIC, fm.getDeterminism());
+ assertEquals("misc", fm.getCategory());
+ assertFalse(fm.isNullOnNull());
+ }
+
+ @Test
public void testVarArgs() throws Exception {
- String ddl = "CREATE FUNCTION SourceFunc(flag boolean vararg) RETURNS varchar";
+ String ddl = "CREATE FUNCTION SourceFunc(flag boolean) RETURNS varchar options (varargs 'true')";
Schema s = helpParse(ddl, "model");
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -544,10 +544,6 @@
procedureRecord.setQueryPlan(transformRecord.getTransformation());
}
} else if (procedureRecord.isFunction()) {
- boolean deterministic = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "deterministic", true)); //$NON-NLS-1$
- boolean nullOnNull = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "null-on-null", false)); //$NON-NLS-1$
- boolean varargs = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "varargs", false)); //$NON-NLS-1$
- boolean aggregate = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "aggregate", false)); //$NON-NLS-1$
FunctionParameter outputParam = null;
List<FunctionParameter> args = new ArrayList<FunctionParameter>(procedureRecord.getParameters().size() - 1);
boolean valid = true;
@@ -572,25 +568,8 @@
}
if (valid && outputParam != null) {
FunctionMethod function = new FunctionMethod(procedureRecord.getName(), procedureRecord.getAnnotation(), model.getName(), PushDown.MUST_PUSHDOWN,
- null, null, args, outputParam, false, deterministic?Determinism.DETERMINISTIC:Determinism.NONDETERMINISTIC);
- function.setNullOnNull(nullOnNull);
- if (varargs && !function.getInputParameters().isEmpty()) {
- function.getInputParameters().get(args.size() - 1).setVarArg(varargs);
- }
- if (aggregate) {
- boolean analytic = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "analytic", false)); //$NON-NLS-1$
- boolean allowsOrderBy = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "allows-orderby", false)); //$NON-NLS-1$
- boolean usesDistinctRows = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "uses-distinct-rows", false)); //$NON-NLS-1$
- boolean allowsDistinct = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "allows-distinct", false)); //$NON-NLS-1$
- boolean decomposable = Boolean.valueOf(procedureRecord.getProperty(AbstractMetadataRecord.RELATIONAL_URI + "decomposable", false)); //$NON-NLS-1$
- AggregateAttributes aa = new AggregateAttributes();
- aa.setAnalytic(analytic);
- aa.setAllowsOrderBy(allowsOrderBy);
- aa.setUsesDistinctRows(usesDistinctRows);
- aa.setAllowsDistinct(allowsDistinct);
- aa.setDecomposable(decomposable);
- function.setAggregateAttributes(aa);
- }
+ null, null, args, outputParam, false, Determinism.DETERMINISTIC);
+ FunctionMethod.convertExtensionMetadata(procedureRecord, function);
model.addFunction(function);
continue;
}
Modified: trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java
===================================================================
--- trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2012-04-11 14:39:26 UTC (rev 3990)
+++ trunk/metadata/src/test/java/org/teiid/metadata/index/VDBMetadataFactory.java 2012-04-11 15:17:17 UTC (rev 3991)
@@ -73,7 +73,7 @@
}
return system;
} catch (Exception e) {
- throw new TeiidRuntimeException("System VDB not found");
+ throw new TeiidRuntimeException(e, "System VDB load error");
}
}
12 years, 8 months
teiid SVN: r3990 - trunk/documentation/javadocs.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2012-04-11 10:39:26 -0400 (Wed, 11 Apr 2012)
New Revision: 3990
Modified:
trunk/documentation/javadocs/pom.xml
Log:
forward merge from 7.7.1
Modified: trunk/documentation/javadocs/pom.xml
===================================================================
--- trunk/documentation/javadocs/pom.xml 2012-04-10 20:05:51 UTC (rev 3989)
+++ trunk/documentation/javadocs/pom.xml 2012-04-11 14:39:26 UTC (rev 3990)
@@ -13,117 +13,117 @@
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-adminshell</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-api</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-cache-jbosscache</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-client-jdk15</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-common-core</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>salesforce-api</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-file</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-hive</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-jdbc</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-ldap</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-loopback</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-olap</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-salesforce</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>translator-ws</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-console</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-engine</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-hibernate-dialect</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-jboss-integration</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-metadata</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-runtime</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>test-integration-common</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.teiid.teiid-test-integration</groupId>
<artifactId>test-integration-db</artifactId>
- <version>{project.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
12 years, 8 months