db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1581312 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/optional/lucene/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Tue, 25 Mar 2014 13:16:08 GMT
Author: rhillegas
Date: Tue Mar 25 13:16:08 2014
New Revision: 1581312

URL: http://svn.apache.org/r1581312
Log:
DERBY-590: Remove the ID column from the Lucene plugin listIndexes() table function; commit
derby-590-04-aa-removeIDFromListIndexes.diff.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneListIndexesVTI.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneSupport.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneListIndexesVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneListIndexesVTI.java?rev=1581312&r1=1581311&r2=1581312&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneListIndexesVTI.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneListIndexesVTI.java
Tue Mar 25 13:16:08 2014
@@ -51,7 +51,7 @@ public class LuceneListIndexesVTI extend
 	public LuceneListIndexesVTI()
         throws IOException, PrivilegedActionException, SQLException
     {
-		super(new String[]{"ID","SCHEMANAME","TABLENAME","COLUMNNAME","LASTUPDATED"});
+		super( new String[] { "SCHEMANAME","TABLENAME","COLUMNNAME","LASTUPDATED" } );
 		
 		String dir = LuceneSupport.getIndexLocation( LuceneSupport.getDefaultConnection(), null,
null, null );
 		
@@ -110,14 +110,12 @@ public class LuceneListIndexesVTI extend
         String  schemaPart = schemaDir.getName();
 
 		if (col == 1) {
-			return Integer.toString(row+1);
-		} else if (col == 2) {
 			return schemaPart;
-		} else if (col == 3) {
+		} else if (col == 2) {
 			return tablePart;
-		} else if (col == 4) {
+		} else if (col == 3) {
 			return columnPart;
-		} else if (col == 5) {
+		} else if (col == 4) {
             try {
                 DateFormat df = DateFormat.getDateTimeInstance();
                 return df.format( LuceneSupport.getLastModified( columnDir ) );

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneSupport.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneSupport.java?rev=1581312&r1=1581311&r2=1581312&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneSupport.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/optional/lucene/LuceneSupport.java
Tue Mar 25 13:16:08 2014
@@ -127,7 +127,6 @@ public class LuceneSupport implements Op
 		listFunction.append(" () ");
 		listFunction.append("returns table");
 		listFunction.append("(");
-		listFunction.append("id int,");
 		listFunction.append("schemaname varchar( 128 ),");
 		listFunction.append("tablename varchar( 128 ),");
 		listFunction.append("columnname varchar( 128 ),");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java?rev=1581312&r1=1581311&r2=1581312&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCollationTest.java
Tue Mar 25 13:16:08 2014
@@ -162,10 +162,10 @@ public class LuceneCollationTest extends
         assertResults
             (
              conn,
-             "select id, schemaName, tableName, columnName from table ( LuceneSupport.listIndexes()
) listindexes",
+             "select schemaName, tableName, columnName from table ( LuceneSupport.listIndexes()
) listindexes",
              new String[][]
              {
-                 { "1", "RUTH", "POEMS", "POEMTEXT" },
+                 { "RUTH", "POEMS", "POEMTEXT" },
              },
              false
              );

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java?rev=1581312&r1=1581311&r2=1581312&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
Tue Mar 25 13:16:08 2014
@@ -195,14 +195,14 @@ public class LuceneSupportPermsTest exte
              );
 
         // alice can list indexes even on tables owned by ruth
-        String  listIndexes = "select id, schemaName, tableName, columnName from table (
LuceneSupport.listIndexes() ) listindexes";
+        String  listIndexes = "select schemaName, tableName, columnName from table ( LuceneSupport.listIndexes()
) listindexes";
         assertResults
             (
              aliceConnection,
              listIndexes,
              new String[][]
              {
-                 { "1", "RUTH", "POEMS", "POEMTEXT" },
+                 { "RUTH", "POEMS", "POEMTEXT" },
              },
              false
              );

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java?rev=1581312&r1=1581311&r2=1581312&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportTest.java
Tue Mar 25 13:16:08 2014
@@ -188,14 +188,14 @@ public class LuceneSupportTest extends B
 	    // leave out lastmodified as the date will change
 	    String[][] expectedRows = new String[][]
             {
-                { "1", "LUCENETEST", "TITLES", "AUTHOR" },
-	    		{ "2", "LUCENETEST", "TITLES", "TITLE" }
+                { "LUCENETEST", "TITLES", "AUTHOR" },
+	    		{ "LUCENETEST", "TITLES", "TITLE" }
             };
 	    JDBC.assertFullResultSet
             (
              s.executeQuery
              (
-              "select id, schemaname, tablename, columnname from table ( LuceneSupport.listIndexes()
) listindexes"
+              "select schemaname, tablename, columnname from table ( LuceneSupport.listIndexes()
) listindexes order by schemaname, tablename, columnname"
               ),
              expectedRows
              );
@@ -206,13 +206,13 @@ public class LuceneSupportTest extends B
 
 	    expectedRows = new String[][]
             {
-                { "1", "LUCENETEST", "TITLES", "AUTHOR" },
+                { "LUCENETEST", "TITLES", "AUTHOR" },
             };
 	    JDBC.assertFullResultSet
             (
              s.executeQuery
              (
-              "select id, schemaname, tablename, columnname from table ( LuceneSupport.listIndexes()
) listindexes"
+              "select schemaname, tablename, columnname from table ( LuceneSupport.listIndexes()
) listindexes order by schemaname, tablename, columnname"
               ),
              expectedRows
              );
@@ -225,7 +225,7 @@ public class LuceneSupportTest extends B
             (
              s.executeQuery
              (
-              "select id, schemaname, tablename, columnname from table ( LuceneSupport.listIndexes()
) listindexes"
+              "select schemaname, tablename, columnname from table ( LuceneSupport.listIndexes()
) listindexes"
               )
              );
 



Mime
View raw message