← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/probe-no-doc-order-sort into lp:zorba

 

Matthias Brantner has proposed merging lp:~zorba-coders/zorba/probe-no-doc-order-sort into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/probe-no-doc-order-sort/+merge/124322
-- 
https://code.launchpad.net/~zorba-coders/zorba/probe-no-doc-order-sort/+merge/124322
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-09-13 08:28:50 +0000
+++ ChangeLog	2012-09-13 23:13:22 +0000
@@ -17,6 +17,7 @@
   * New memory management for compiler expressions (no more ref counting)
   * Exteneded some optimization rules (variable inlining/elimination and positional
     predicate rewrite) to general flwor expressions.
+  * Removed document-order sorting after the index value probe functions.
 
 Bug Fixes/Other Changes:
   * Fixed bug #867227 (Improved error message for missing commas)

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2012-09-11 22:55:05 +0000
+++ src/compiler/translator/translator.cpp	2012-09-13 23:13:22 +0000
@@ -10588,17 +10588,6 @@
     FunctionConsts::FunctionKind lKind = f->getKind();
     switch (lKind)
     {
-      case FunctionConsts::FN_ZORBA_XQDDF_PROBE_INDEX_RANGE_VALUE_N:
-      case FunctionConsts::FN_ZORBA_XQDDF_PROBE_INDEX_POINT_VALUE_N:
-      {
-        FunctionConsts::FunctionKind fkind = FunctionConsts::OP_SORT_NODES_ASC_1;
-
-        resultExpr = theExprManager->create_fo_expr(theRootSctx,
-                                 foExpr->get_loc(),
-                                 BuiltinFunctionLibrary::getFunction(fkind),
-                                 foExpr);
-        break;
-      }
       case FunctionConsts::FN_ZORBA_XQDDF_PROBE_INDEX_POINT_GENERAL_N:
       case FunctionConsts::FN_ZORBA_XQDDF_PROBE_INDEX_RANGE_GENERAL_N:
       {

=== modified file 'test/rbkt/Queries/zorba/index/auctions1.xq'
--- test/rbkt/Queries/zorba/index/auctions1.xq	2012-09-11 22:55:05 +0000
+++ test/rbkt/Queries/zorba/index/auctions1.xq	2012-09-13 23:13:22 +0000
@@ -77,7 +77,7 @@
 
 try
 { 
-  index_dml:probe-index-point-value($auctions:AuctionDates, xs:date("2000-12-04"))
+  index_dml:probe-index-point-value($auctions:AuctionDates, xs:date("2000-12-04"))/.
 }
 catch * 
 {
@@ -91,7 +91,7 @@
 
 try
 {
-  index_dml:probe-index-point-value($auctions:AuctionDates, 10)
+  index_dml:probe-index-point-value($auctions:AuctionDates, 10)/.
 }
 catch * 
 {
@@ -273,7 +273,7 @@
 
 try
 {
-  index_dml:probe-index-point-value($auctions:AuctionDates2, xs:date("2000-12-04"))
+  index_dml:probe-index-point-value($auctions:AuctionDates2, xs:date("2000-12-04"))/.
 }
 catch * 
 {
@@ -287,7 +287,7 @@
 
 try
 {
-  index_dml:probe-index-point-value($auctions:AuctionDates2, 10)
+  index_dml:probe-index-point-value($auctions:AuctionDates2, 10)/.
 }
 catch * 
 {
@@ -394,7 +394,7 @@
                                                  fn:true(),
                                                  fn:false(),
                                                  fn:true(),
-                                                 fn:true())
+                                                 fn:true())/.
 return <person>{$person/@id, $person//@income}</person>
 }
 catch *
@@ -414,7 +414,7 @@
                                                  fn:true(),
                                                  fn:true(),
                                                  fn:true(),
-                                                 fn:true())
+                                                 fn:true())/.
 return <person>{$person/@id, $person//@income}</person>,
 
 "
@@ -429,7 +429,7 @@
                                                  fn:true(),
                                                  fn:false(),
                                                  fn:true(),
-                                                 fn:true())
+                                                 fn:true())/.
 return <person>{$person/@id, $person//@income}</person>,
 
 "
@@ -444,7 +444,7 @@
                                                  fn:true(),
                                                  fn:true(),
                                                  fn:true(),
-                                                 fn:true())
+                                                 fn:true())/.
 return <person>{$person/@id, $person//@income}</person>,
 
 "
@@ -474,7 +474,7 @@
                                                  fn:false(),
                                                  fn:false(),
                                                  fn:true(),
-                                                 fn:false())
+                                                 fn:false())/.
 return <person>{$person/@id, $person//@income}</person>,
 
 

=== modified file 'test/rbkt/Queries/zorba/index/auctions_module1.xqlib'
--- test/rbkt/Queries/zorba/index/auctions_module1.xqlib	2012-09-11 22:55:05 +0000
+++ test/rbkt/Queries/zorba/index/auctions_module1.xqlib	2012-09-13 23:13:22 +0000
@@ -116,7 +116,7 @@
 
 declare function auctions:probe-point-id($indexName as xs:QName, $id as xs:string)
 {
-  index_dml:probe-index-point-value($indexName, $id)
+  index_dml:probe-index-point-value($indexName, $id)/.
 };
 
 
@@ -132,13 +132,13 @@
                                 xs:boolean("true"), 
                                 xs:boolean("false"),
                                 xs:boolean("true"),
-                                xs:boolean("false"))
+                                xs:boolean("false"))/.
 };
 
 
 declare function auctions:probe-point-city($indexName as xs:QName, $city as xs:string?)
 {
-  index_dml:probe-index-point-value($indexName, $city)
+  index_dml:probe-index-point-value($indexName, $city)/.
 };
 
 
@@ -154,7 +154,7 @@
                                 xs:boolean("true"),
                                 xs:boolean("false"),
                                 xs:boolean("true"),
-                                xs:boolean("false"))
+                                xs:boolean("false"))/.
 };
 
 

=== modified file 'test/rbkt/Queries/zorba/index/undo2.xq'
--- test/rbkt/Queries/zorba/index/undo2.xq	2012-09-11 22:55:05 +0000
+++ test/rbkt/Queries/zorba/index/undo2.xq	2012-09-13 23:13:22 +0000
@@ -34,10 +34,10 @@
 
 dml:collection($u:auctions1)
 ,
-idml:probe-index-point-value($u:PersonId1, "1")
-,
-idml:probe-index-point-value($u:PersonId1, "3")
-,
-idml:probe-index-point-value($u:PersonId1, "5")
+idml:probe-index-point-value($u:PersonId1, "1")/.
+,
+idml:probe-index-point-value($u:PersonId1, "3")/.
+,
+idml:probe-index-point-value($u:PersonId1, "5")/.
 ,
 dml:collection($u:auctions2)

=== modified file 'test/rbkt/Queries/zorba/index/undo3.xq'
--- test/rbkt/Queries/zorba/index/undo3.xq	2012-04-26 22:18:45 +0000
+++ test/rbkt/Queries/zorba/index/undo3.xq	2012-09-13 23:13:22 +0000
@@ -41,17 +41,17 @@
 "
 "
 ,
-idml:probe-index-point-value($u:PersonId1, "1")
-,
-"
-"
-,
-idml:probe-index-point-value($u:PersonId1, "3")
-,
-"
-"
-,
-idml:probe-index-point-value($u:PersonId1, "5")
+idml:probe-index-point-value($u:PersonId1, "1")/.
+,
+"
+"
+,
+idml:probe-index-point-value($u:PersonId1, "3")/.
+,
+"
+"
+,
+idml:probe-index-point-value($u:PersonId1, "5")/.
 ,
 "
 "

=== modified file 'test/rbkt/Queries/zorba/index/undo4.xq'
--- test/rbkt/Queries/zorba/index/undo4.xq	2012-07-09 05:44:06 +0000
+++ test/rbkt/Queries/zorba/index/undo4.xq	2012-09-13 23:13:22 +0000
@@ -37,7 +37,7 @@
 ,
 try
 {
-  idml:probe-index-point-value($u:PersonCars, "vw")
+  idml:probe-index-point-value($u:PersonCars, "vw")/.
 }
 catch * 
 {
@@ -136,7 +136,7 @@
 {
 delete nodes dml:collection($u:c1)[1]/car[1];
 
-idml:probe-index-point-value($u:PersonCars, "vw")
+idml:probe-index-point-value($u:PersonCars, "vw")/.
 }
 ,
 "


Follow ups