db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1593701 - in /db/derby/code/trunk/java: optional/org/apache/derby/optional/lucene/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Sat, 10 May 2014 13:42:44 GMT
Author: rhillegas
Date: Sat May 10 13:42:43 2014
New Revision: 1593701

URL: http://svn.apache.org/r1593701
Log:
DERBY-590: Change the special NO_CEILING value from 0 to NULL for the scoreCeiling argument
to the Lucene query table function; commit derby-590-30-aa-nullableScoreCeiling.diff.

Modified:
    db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java
    db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneBackupTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.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/LuceneInMemoryTest.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/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java?rev=1593701&r1=1593700&r2=1593701&view=diff
==============================================================================
--- db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java
(original)
+++ db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneQueryVTI.java
Sat May 10 13:42:43 2014
@@ -91,7 +91,7 @@ public class LuceneQueryVTI extends Stri
     private String  _queryText;
     private String  _queryParserMaker;
     private int         _windowSize;
-    private float   _scoreCeiling;
+    private Float   _scoreCeiling;
 
     private String      _schema;
     private String      _table;
@@ -122,7 +122,7 @@ public class LuceneQueryVTI extends Stri
          String queryText,
          String queryParserMaker,
          int    windowSize,
-         float scoreCeiling
+         Float scoreCeiling
          )
         throws SQLException
     {
@@ -452,7 +452,7 @@ public class LuceneQueryVTI extends Stri
 				
             Query luceneQuery = qp.parse( _queryText );
             TopScoreDocCollector tsdc = TopScoreDocCollector.create( _windowSize, true);
-            if ( _scoreCeiling != 0 ) {
+            if ( _scoreCeiling != null ) {
                 tsdc = TopScoreDocCollector.create( _windowSize, new ScoreDoc( 0, _scoreCeiling
), true );
             }
 

Modified: db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java?rev=1593701&r1=1593700&r2=1593701&view=diff
==============================================================================
--- db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java
(original)
+++ db/derby/code/trunk/java/optional/org/apache/derby/optional/lucene/LuceneSupport.java
Sat May 10 13:42:43 2014
@@ -329,7 +329,7 @@ public class LuceneSupport implements Op
          String queryText,
          String queryParserMaker,
          int    windowSize,
-         float scoreCeiling
+         Float scoreCeiling
          )
         throws ParseException, IOException, SQLException
     {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneBackupTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneBackupTest.java?rev=1593701&r1=1593700&r2=1593701&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneBackupTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneBackupTest.java
Sat May 10 13:42:43 2014
@@ -77,7 +77,7 @@ public class LuceneBackupTest extends Ge
 
     private static  final   String      READ_POEMS_INDEX =
         "select p.originalAuthor, i.score\n" +
-        "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n"
+
+        "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, null ) ) i\n"
+
         "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
         "order by i.score desc\n";
     private static  final   String[][]  DEFAULT_POEMS_RESULT =

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java?rev=1593701&r1=1593700&r2=1593701&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneCoarseAuthorizationTest.java
Sat May 10 13:42:43 2014
@@ -178,7 +178,7 @@ public class LuceneCoarseAuthorizationTe
 
         String  readPoemsIndex =
             "select p.originalAuthor, i.score\n" +
-            "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n"
+
+            "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, null )
) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
         String[][]  defaultPoemResults =

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=1593701&r1=1593700&r2=1593701&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
Sat May 10 13:42:43 2014
@@ -150,7 +150,7 @@ public class LuceneCollationTest extends
         assertResults
             (
              conn,
-             "select * from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) luceneResults
order by poemID",
+             "select * from table ( ruth.poems__poemText( 'star', null, 1000, null ) ) luceneResults
order by poemID",
              new String[][]
              {
                  { "3", "3", "2", "0.22933942" },

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneInMemoryTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneInMemoryTest.java?rev=1593701&r1=1593700&r2=1593701&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneInMemoryTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneInMemoryTest.java
Sat May 10 13:42:43 2014
@@ -136,7 +136,7 @@ public class LuceneInMemoryTest extends 
 
         String  readPoemsIndex =
             "select p.originalAuthor, i.score\n" +
-            "from poems p, table ( poems__poemText( 'star', null, 1000, 0 ) ) i\n" +
+            "from poems p, table ( poems__poemText( 'star', null, 1000, null ) ) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
         String[][]  defaultPoemResults =

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=1593701&r1=1593700&r2=1593701&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
Sat May 10 13:42:43 2014
@@ -208,7 +208,7 @@ public class LuceneSupportPermsTest exte
             ( ruthConnection, NONEXISTENT_INDEX, "call LuceneSupport.updateIndex( 'ruth',
'poems', 'originalAuthor', null )" );
 
         // alice can't view an index created by ruth
-        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', null,
1000, 0 ) ) luceneResults order by poemID";
+        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', null,
1000, null ) ) luceneResults order by poemID";
         expectExecutionError( aliceConnection, LACK_EXECUTE_PRIV, viewPoemsIndex );
 
         // but ruth can
@@ -317,7 +317,7 @@ public class LuceneSupportPermsTest exte
         }
 
         // but alice still needs select privilege on the base table columns
-        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', null,
1000, 0 ) ) luceneResults order by poemid";
+        String  viewPoemsIndex = "select * from table ( ruth.poems__poemText( 'star', null,
1000, null ) ) luceneResults order by poemid";
         String[][]  viewPoemsIndexResults = new String[][]
             {
                 { "3", "3", "2", "0.22933942" },
@@ -461,7 +461,7 @@ public class LuceneSupportPermsTest exte
             (
              ruthConnection,
              "select p.originalAuthor, i.score\n" +
-             "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) )
i\n" +
+             "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, null )
) i\n" +
              "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
              "order by i.score desc\n",
              new String[][]
@@ -510,7 +510,7 @@ public class LuceneSupportPermsTest exte
         expectCompilationError
             (
              ruthConnection, NONEXISTENT_TABLE_FUNCTION,
-             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', null, 100, 0 ) ) t"
+             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', null, 100, null ) ) t"
              );
 
         goodStatement( dboConnection, UNLOAD_TOOL );
@@ -547,7 +547,7 @@ public class LuceneSupportPermsTest exte
 
         String  query =
             "select p.originalAuthor, i.score\n" +
-            "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n"
+
+            "from ruth.poems p, table ( ruth.poems__poemText( 'star', null, 1000, null )
) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
 
@@ -655,7 +655,7 @@ public class LuceneSupportPermsTest exte
         // vet index contents
         String  selectFromViewIndex =
             "select p.originalAuthor, i.score\n" +
-            "from ruth.poems p, table ( ruth.poemView__poemText( 'star', null, 1000, 0 )
) i\n" +
+            "from ruth.poems p, table ( ruth.poemView__poemText( 'star', null, 1000, null
) ) i\n" +
             "where p.poemID = i.poemID and p.versionStamp = i.versionStamp\n" +
             "order by i.score desc\n";
         assertResults
@@ -760,7 +760,7 @@ public class LuceneSupportPermsTest exte
             (
              ruthConnection,
              "select *\n" +
-             "from table ( ruth.poems__poemText( 'star', null, 1000, 0 ) ) i\n" +
+             "from table ( ruth.poems__poemText( 'star', null, 1000, null ) ) i\n" +
              "order by i.score desc\n",
              new String[][]
              {
@@ -844,7 +844,7 @@ public class LuceneSupportPermsTest exte
         assertResults
             (
              ruthConnection,
-             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', null, 100, 0 ) ) t",
+             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', null, 100, null ) ) t",
              new String[][]
              {
                  { "10", "9", "2.2791052" },
@@ -865,7 +865,7 @@ public class LuceneSupportPermsTest exte
         assertResults
             (
              ruthConnection,
-             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', null, 3, 0 ) ) t",
+             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', null, 3, null ) ) t",
              new String[][]
              {
                  { "10", "9", "2.2791052" },
@@ -908,7 +908,7 @@ public class LuceneSupportPermsTest exte
         assertResults
             (
              ruthConnection,
-             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', 'org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportPermsTest.constantStringQueryParser',
100, 0 ) ) t",
+             "select * from table( ruth.textTable__textCol( 'one two three four five six
seven eight nine ten', 'org.apache.derbyTesting.functionTests.tests.lang.LuceneSupportPermsTest.constantStringQueryParser',
100, null ) ) t",
              new String[][]
              {
                  { "1", "0", "1.597837" },

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=1593701&r1=1593700&r2=1593701&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
Sat May 10 13:42:43 2014
@@ -98,7 +98,7 @@ public class LuceneSupportTest extends B
             (
              s.executeQuery
              (
-              "select * from table ( lucenetest.titles__title( 'grapes', null, 1000, 0 )
) luceneResults"
+              "select * from table ( lucenetest.titles__title( 'grapes', null, 1000, null
) ) luceneResults"
               ),
              expectedRows
              );
@@ -134,7 +134,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select title, author, publisher, documentID\n" +
-              "from lucenetest.titles t, table ( lucenetest.titles__title( 'grapes', null,
1000, 0 ) ) l\n" +
+              "from lucenetest.titles t, table ( lucenetest.titles__title( 'grapes', null,
1000, null ) ) l\n" +
               "where t.id = l.id\n" 
               ),
              expectedRows
@@ -159,7 +159,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select *\n" +
-              "from table ( lucenetest.titles__title( 'mice', null, 1000, 0 ) ) luceneResults\n"
+              "from table ( lucenetest.titles__title( 'mice', null, 1000, null ) ) luceneResults\n"
               )
              );
 	    
@@ -171,7 +171,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select *\n" +
-              "from table ( lucenetest.titles__title( 'mice', null, 1000, 0 ) ) luceneResults\n"
+              "from table ( lucenetest.titles__title( 'mice', null, 1000, null ) ) luceneResults\n"
               )
              );
 	    
@@ -188,7 +188,7 @@ public class LuceneSupportTest extends B
              s.executeQuery
              (
               "select *\n" +
-              "from table ( lucenetest.titles__title( 'mice', null, 1000, 0 ) ) luceneResults\n"
+              "from table ( lucenetest.titles__title( 'mice', null, 1000, null ) ) luceneResults\n"
               ),
              expectedRows
              );



Mime
View raw message