Merge lp:~zorba-coders/zorba/skiplimit into lp:zorba

Proposed by William Candillon
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/skiplimit
Merge into: lp:zorba
Diff against target: 417 lines (+222/-3)
19 files modified
src/compiler/parser/parser.y (+22/-3)
src/compiler/parser/scanner.l (+2/-0)
src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+2/-0)
src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+2/-0)
src/compiler/parsetree/parsenode_print_xquery_visitor.cpp (+18/-0)
src/compiler/parsetree/parsenode_visitor.h (+2/-0)
src/compiler/parsetree/parsenodes.cpp (+31/-0)
src/compiler/parsetree/parsenodes.h (+27/-0)
src/compiler/translator/translator.cpp (+87/-0)
test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-5.xml.res (+1/-0)
test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq (+4/-0)
test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq (+3/-0)
test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq (+3/-0)
test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq (+7/-0)
test/rbkt/Queries/zorba/offset-limit/offset-limit-5.xq (+7/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/skiplimit
Reviewer Review Type Date Requested Status
Ghislain Fourny Needs Fixing
Markos Zaharioudakis Needs Information
William Candillon Approve
Review via email: mp+173126@code.launchpad.net

This proposal has been superseded by a proposal from 2013-07-19.

Commit message

Add offset limit clauses to the FLWOR.

Description of the change

Add offset limit clauses to the FLWOR.
These clauses are similar to limit and offset from SQL.
For example:
for $i in (1 to 10)
offset 5
limit 2
return $i

To post a comment you must log in.
Revision history for this message
William Candillon (wcandillon) :
review: Approve
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

1. I think Dana will have to approve the adding of proprietary syntax to do what is essentially syntactic sugar for fn:subsequence().

2. Why allow multiple offset/limit clauses when, as far as I can understand, only the last offset/limit clause takes effect?

review: Needs Information
Revision history for this message
William Candillon (wcandillon) wrote :

1. I make an email loop to get Dana's approval.

2. There are couple of options, I wasn't sure which one to pick:

a) (offset ExprSingle)? (limit ExprSingle)?
b) (offset ExprSingle) | (limit ExprSingle) | (limit ExprSingle offset ExprSingle) | (offset ExprSingle limit ExprSingle)
c) ((offset ExprSingle) | (limit ExprSingle)?)*
I ended up doing c) but I can do a) or b).

lp:~zorba-coders/zorba/skiplimit updated
11548. By Chris Hillery

Updated node-position module to Zorba 3.0 format.
Approved: Juan Zacarias, Chris Hillery

11549. By Markos Zaharioudakis

Some work towards multi-threading
1. Fixed a couple of threading bugs in qname pool
2. Redefined free() method for root_static_context and for builtin functions
3. Annotations are not RCObjects anymore
4. Use atomic ints are counters in RCObjects
5. No query cloning in testdriver_mt
Approved: Markos Zaharioudakis

11550. By Chris Hillery

Update "JSON" module: now known as "json-xml", function names changed, namespace changed to zorba.io, moved out of unnecessary subdirectories.
Approved: Paul J. Lucas, Chris Hillery

11551. By sorin.marian.nasoi <email address hidden>

- fixed examples links in the XQDoc documentation
Approved: Sorin Marian Nasoi, Chris Hillery

11552. By sorin.marian.nasoi <email address hidden>

- bumped QT test-suite version
Approved: Chris Hillery, Sorin Marian Nasoi

11553. By sorin.marian.nasoi <email address hidden>

- since ICU does not support "FULLY-NORMALIZED" normalization form Zorba does not support it either: updated the Zorba Manifest to reflect this.
Approved: Chris Hillery, Sorin Marian Nasoi

Revision history for this message
Ghislain Fourny (gislenius) wrote :

I have the feeling that this could and should be made more general, i.e., introduce "limit" ExprSingle and "offset" ExprSingle as regular FLWOR clauses, like any other clauses, that you can put everywhere (as intermediate clauses), and that are syntactic sugars for "count $i where $i le ExprSingle" and "count $i where $i gt ExprSingle" respectively.
That way, there would no longer be any need to go through syntactic options as above as they behave like any other clause.

Concretely, I think that it comes down to something as simple as:

IntermediateClause ::= InitialClause | WhereClause | GroupByClause | OrderByClause | CountClause | OffsetClause | LimitClause

OffsetClause ::= "offset" ExprSingle

LimitClause ::= "limit" ExprSingle

Revision history for this message
Ghislain Fourny (gislenius) :
review: Needs Fixing
Revision history for this message
William Candillon (wcandillon) wrote :

Hi Ghislain,

Thank you so much for this insight. That makes perfect sense.

Now I see two way this can go:
- offset/limit is just a syntactic sugar for count/where and using the subsequence optimisation for it is completely orthogonal to this merge proposal.
- offset/limit doesn't make sense if the subsequence optimisation is not used. If so, could I have some pointers on how to implement this optimisation?

Revision history for this message
Ghislain Fourny (gislenius) wrote :

Hi William,

I think that count$i-where$i aka offset/limit can be optimized, but in most cases not in terms of subsequence: it sets an offset or a limit on the number of tuples, not on the number of items (a tuple may well produce zero, or more than one item in the end). I think that an early exit, or skipping, in FLWOR iterators should be possible when encountering a count$i-where$i. Markos is probably more familiar with this code than I am though.

Does it make sense?

Revision history for this message
Ghislain Fourny (gislenius) wrote :

My remark would correspond to your first choice: offset/limit is just a syntactic sugar, and count$i-where$i is optimized separately.

Revision history for this message
William Candillon (wcandillon) wrote :

It feels that the current proposal is actually quite efficient and has a predictable performance.
But I like the beauty of having the count/where syntactic sugar. So I'm not sure what do to.

lp:~zorba-coders/zorba/skiplimit updated
11554. By Chris Hillery

Remove "system" module dependency from core tests.
Approved: Juan Zacarias, Chris Hillery

11555. By Chris Hillery

Don't check %private variables.
Approved: Rodolfo Ochoa, Chris Hillery

11556. By Chris Hillery

Update base64 module to Zorba 3.0 standards.
Approved: Luis Rodriguez Gonzalez, Chris Hillery

11557. By Chris Hillery

Update core math and random modules to Zorba 3.0 standards.
Approved: Luis Rodriguez Gonzalez, Chris Hillery

11558. By William Candillon

Add Offset clause.

11559. By William Candillon

Implement limit clause.

11560. By William Candillon

Add tests.

11561. By William Candillon

Update test suite.

11562. By William Candillon

Remove useless comment.

11563. By William Candillon

Merge.

11564. By William Candillon

Remove unused variable.

11565. By William Candillon

Fix parser bug.

11566. By Paul J. Lucas

Merge from trunk.

11567. By Paul J. Lucas

s/OP_GREATER_EQUAL_2/OP_GREATER_2/

11568. By Paul J. Lucas

Removed unnecessary destructors.

11569. By Paul J. Lucas

Merge from trunk.

11570. By Paul J. Lucas

Merge from trunk.

11571. By Paul J. Lucas

Now using getNameAsString().

11572. By Paul J. Lucas

Comment fix to match reality.

11573. By Paul J. Lucas

Merge from trunk.

11574. By Paul J. Lucas

Fixed test results.

11575. By Paul J. Lucas

Removed erroneous use of theOffsetExpr.

11576. By Paul J. Lucas

Removed useless theOffsetExpr.

11577. By Paul J. Lucas

Comment fix.

Unmerged revisions

11577. By Paul J. Lucas

Comment fix.

11576. By Paul J. Lucas

Removed useless theOffsetExpr.

11575. By Paul J. Lucas

Removed erroneous use of theOffsetExpr.

11574. By Paul J. Lucas

Fixed test results.

11573. By Paul J. Lucas

Merge from trunk.

11572. By Paul J. Lucas

Comment fix to match reality.

11571. By Paul J. Lucas

Now using getNameAsString().

11570. By Paul J. Lucas

Merge from trunk.

11569. By Paul J. Lucas

Merge from trunk.

11568. By Paul J. Lucas

Removed unnecessary destructors.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compiler/parser/parser.y'
2--- src/compiler/parser/parser.y 2013-06-17 20:05:21 +0000
3+++ src/compiler/parser/parser.y 2013-07-19 07:43:31 +0000
4@@ -325,6 +325,8 @@
5 %token QUOTE "'\"'"
6 %token RBRACE "'}'"
7 %token RBRACK "']'"
8+%token OFFSET "'offset'"
9+%token LIMIT "'limit'"
10 %token RETURN "'return'"
11 %token RPAR "')'"
12 %token SATISFIES "'satisfies'"
13@@ -637,6 +639,8 @@
14 %type <node> BlockVarDecl
15 %type <node> WhereClause
16 %type <node> CountClause
17+%type <node> OffsetClause
18+%type <node> LimitClause
19 %type <node> Wildcard
20
21 /* left-hand sides: expressions */
22@@ -883,7 +887,7 @@
23 %destructor { release_hack( $$ ); } SchemaPrefix SequenceType SequenceTypeList Setter SignList SingleType TextTest NamespaceTest TypeDeclaration TypeName TypeName_WITH_HOOK
24 %destructor { release_hack( $$ ); } URILiteralList ValueComp CollectionDecl IndexDecl IndexKeySpec IndexKeyList IntegrityConstraintDecl CtxItemDecl CtxItemDecl2 CtxItemDecl3
25 %destructor { release_hack( $$ ); } CtxItemDecl4 VarDecl VarGetsDecl VarGetsDeclList VarInDecl VarInDeclList WindowVarDecl WindowVars WindowVars2 WindowVars3 FLWORWinCond
26-%destructor { release_hack( $$ ); } VersionDecl VFO_Decl VFO_DeclList WhereClause CountClause Wildcard DecimalFormatDecl TypedFunctionTest AnyFunctionTest TypeList
27+%destructor { release_hack( $$ ); } VersionDecl VFO_Decl VFO_DeclList WhereClause CountClause LimitClause OffsetClause Wildcard DecimalFormatDecl TypedFunctionTest AnyFunctionTest TypeList
28 %destructor { release_hack( $$ ); } SwitchCaseClause SwitchCaseClauseList SwitchCaseOperandList
29
30 #ifdef XQUERY_PARSER
31@@ -2712,8 +2716,23 @@
32 | OrderByClause
33 | GroupByClause
34 | CountClause
35-;
36-
37+ | OffsetClause
38+ | LimitClause
39+;
40+
41+OffsetClause :
42+ OFFSET ExprSingle
43+ {
44+ $$ = new OffsetClause(LOC (@$), $2);
45+ }
46+;
47+
48+LimitClause :
49+ LIMIT ExprSingle
50+ {
51+ $$ = new LimitClause(LOC (@$), $2);
52+ }
53+;
54
55 FLWORClauseList :
56 ForLetWinClause
57
58=== modified file 'src/compiler/parser/scanner.l'
59--- src/compiler/parser/scanner.l 2013-04-23 13:20:31 +0000
60+++ src/compiler/parser/scanner.l 2013-07-19 07:43:31 +0000
61@@ -557,6 +557,8 @@
62 "by" { return token::BY; }
63 "stable" { return token::STABLE; }
64 "or" { return token::OR; }
65+"limit" { return token::LIMIT; }
66+"offset" { return token::OFFSET; }
67 "return" { return token::RETURN; }
68 #ifdef JSONIQ_SCANNER
69 "select" { return token::RETURN; }
70
71=== modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp'
72--- src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2013-06-07 13:46:26 +0000
73+++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp 2013-07-19 07:43:31 +0000
74@@ -726,6 +726,8 @@
75 BEGIN_END_TAG (ContextItemExpr)
76 BEGIN_END_TAG (CopyNamespacesDecl)
77 BEGIN_END_TAG (CountClause)
78+BEGIN_END_TAG (LimitClause)
79+BEGIN_END_TAG (OffsetClause)
80 BEGIN_END_TAG (DefaultCollationDecl)
81 BEGIN_END_TAG (DeleteExpr)
82 END_TAG (DirAttr)
83
84=== modified file 'src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp'
85--- src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp 2013-07-01 18:59:06 +0000
86+++ src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp 2013-07-19 07:43:31 +0000
87@@ -1529,6 +1529,8 @@
88 XQDOC_NO_BEGIN_END_TAG (VarRef)
89 XQDOC_NO_BEGIN_END_TAG (VFO_DeclList)
90 XQDOC_NO_BEGIN_END_TAG (WhereClause)
91+XQDOC_NO_BEGIN_END_TAG (OffsetClause)
92+XQDOC_NO_BEGIN_END_TAG (LimitClause)
93 XQDOC_NO_BEGIN_END_TAG (WhileExpr)
94 XQDOC_NO_BEGIN_END_TAG (Wildcard)
95 XQDOC_NO_BEGIN_END_TAG (WindowClause)
96
97=== modified file 'src/compiler/parsetree/parsenode_print_xquery_visitor.cpp'
98--- src/compiler/parsetree/parsenode_print_xquery_visitor.cpp 2013-06-07 13:46:26 +0000
99+++ src/compiler/parsetree/parsenode_print_xquery_visitor.cpp 2013-07-19 07:43:31 +0000
100@@ -1199,6 +1199,24 @@
101 }
102 DEFAULT_END_VISIT (WhereClause)
103
104+ void* begin_visit(const OffsetClause& n)
105+ {
106+ os << "offset ";
107+ n.get_offset()->accept(*this);
108+ return 0;
109+ }
110+ DEFAULT_END_VISIT (OffsetClause)
111+
112+
113+ void* begin_visit(const LimitClause& n)
114+ {
115+ os << "limit ";
116+ n.get_limit()->accept(*this);
117+ return 0;
118+ }
119+ DEFAULT_END_VISIT (LimitClause)
120+
121+
122 void* begin_visit(const CountClause& n)
123 {
124 os << "count $" << n.get_varname();
125
126=== modified file 'src/compiler/parsetree/parsenode_visitor.h'
127--- src/compiler/parsetree/parsenode_visitor.h 2013-06-17 13:32:23 +0000
128+++ src/compiler/parsetree/parsenode_visitor.h 2013-07-19 07:43:31 +0000
129@@ -146,6 +146,8 @@
130 DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( VFO_DeclList );
131 DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( WhereClause );
132 DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( CountClause );
133+ DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( OffsetClause );
134+ DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( LimitClause );
135 DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( Wildcard );
136 DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( QName );
137 DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( DecimalFormatNode );
138
139=== modified file 'src/compiler/parsetree/parsenodes.cpp'
140--- src/compiler/parsetree/parsenodes.cpp 2013-06-17 18:00:35 +0000
141+++ src/compiler/parsetree/parsenodes.cpp 2013-07-19 07:43:31 +0000
142@@ -1783,6 +1783,37 @@
143 END_VISITOR();
144 }
145
146+OffsetClause::OffsetClause(
147+ const QueryLoc& loc_,
148+ rchandle<exprnode> _offset_h)
149+:
150+ FLWORClause(loc_),
151+ offset_h(_offset_h)
152+{}
153+
154+
155+void OffsetClause::accept( parsenode_visitor &v ) const
156+{
157+ BEGIN_VISITOR();
158+ ACCEPT (offset_h);
159+ END_VISITOR();
160+}
161+
162+LimitClause::LimitClause(
163+ const QueryLoc& loc_,
164+ rchandle<exprnode> _limit_h)
165+:
166+ FLWORClause(loc_),
167+ limit_h(_limit_h)
168+{}
169+
170+
171+void LimitClause::accept( parsenode_visitor &v ) const
172+{
173+ BEGIN_VISITOR();
174+ ACCEPT (limit_h);
175+ END_VISITOR();
176+}
177
178 void CountClause::accept(parsenode_visitor& v) const
179 {
180
181=== modified file 'src/compiler/parsetree/parsenodes.h'
182--- src/compiler/parsetree/parsenodes.h 2013-06-17 18:00:35 +0000
183+++ src/compiler/parsetree/parsenodes.h 2013-07-19 07:43:31 +0000
184@@ -180,6 +180,8 @@
185 class VarGetsDeclList;
186 class VarGetsDecl;
187 class WhereClause;
188+class OffsetClause;
189+class LimitClause;
190 class GroupByClause;
191 class GroupSpecList;
192 class GroupSpec;
193@@ -2235,6 +2237,31 @@
194 void accept(parsenode_visitor&) const;
195 };
196
197+class OffsetClause : public FLWORClause
198+{
199+protected:
200+ rchandle<exprnode> offset_h;
201+
202+public:
203+ OffsetClause(const QueryLoc&, rchandle<exprnode>);
204+
205+ rchandle<exprnode> get_offset() const { return offset_h; }
206+
207+ void accept(parsenode_visitor&) const;
208+};
209+
210+class LimitClause : public FLWORClause
211+{
212+protected:
213+ rchandle<exprnode> limit_h;
214+
215+public:
216+ LimitClause(const QueryLoc&, rchandle<exprnode>);
217+
218+ rchandle<exprnode> get_limit() const { return limit_h; }
219+
220+ void accept(parsenode_visitor&) const;
221+};
222
223 /*******************************************************************************
224 GroupByClause ::= "group" "by" GroupingSpecList
225
226=== modified file 'src/compiler/translator/translator.cpp'
227--- src/compiler/translator/translator.cpp 2013-07-06 06:59:32 +0000
228+++ src/compiler/translator/translator.cpp 2013-07-19 07:43:31 +0000
229@@ -678,6 +678,8 @@
230
231 std::vector<flwor_clause*> theFlworClausesStack;
232
233+ expr* theOffsetExpr;
234+
235 std::vector<const parsenode*> theTryStack;
236
237 std::stack<NodeSortInfo> theNodeSortStack;
238@@ -6857,6 +6859,7 @@
239 TRACE_VISIT();
240
241 theFlworClausesStack.push_back(NULL);
242+ theOffsetExpr = CREATE(const)(theRootSctx, theUDF, loc, numeric_consts<xs_integer>::one());
243
244 return no_state;
245 }
246@@ -7907,6 +7910,90 @@
247 theFlworClausesStack.push_back(clause);
248 }
249
250+void* begin_visit(const OffsetClause& v)
251+{
252+ TRACE_VISIT ();
253+ return no_state;
254+}
255+
256+void end_visit(const OffsetClause& v, void* /*visit_state*/)
257+{
258+ TRACE_VISIT_OUT ();
259+
260+ expr* theOffsetExpr = pop_nodestack();
261+
262+ //'offset offset_expr' is rewritten to:
263+ //count $Q{http://zorba.io/internals}count
264+ //where ${http://zorba.io/internals}count ge offset_expr
265+
266+ //1. Add Count Clause
267+ push_scope();
268+ store::Item_t countVar;
269+ theSctx->expand_qname(countVar, "http://zorba.io/internals", "", "count", loc);
270+ var_expr* varExpr = bind_var(loc, countVar, var_expr::count_var, NULL);
271+ count_clause* countClause = theExprManager->create_count_clause(theRootSctx,
272+ loc,
273+ varExpr);
274+ theFlworClausesStack.push_back(countClause);
275+
276+ //2. Create WhereExpr
277+ function* f = BUILTIN_FUNC(OP_GREATER_EQUAL_2);
278+ expr* left = lookup_var(countVar, loc, true);
279+ expr* right = theOffsetExpr;
280+ expr* whereExpr = theExprManager->create_fo_expr(theRootSctx, theUDF, loc, f, left, right);
281+
282+ //3. Add WhereClause
283+ whereExpr = wrap_in_bev(whereExpr);
284+ wrap_in_debugger_expr(whereExpr, whereExpr->get_loc());
285+ where_clause* clause = theExprManager->create_where_clause(theRootSctx,
286+ loc,
287+ whereExpr);
288+ theFlworClausesStack.push_back(clause);
289+}
290+
291+void* begin_visit(const LimitClause& v)
292+{
293+ TRACE_VISIT ();
294+ return no_state;
295+}
296+
297+void end_visit(const LimitClause& v, void* /*visit_state*/)
298+{
299+ TRACE_VISIT_OUT ();
300+ //'limit 3' is rewritten to:
301+ //count $Q{http://zorba.io/internals}count
302+ //where ${http://zorba.io/internals}count lt ($offset + 3)
303+
304+ expr* limitExpr = pop_nodestack();
305+
306+ //1. Add Count Clause
307+ push_scope();
308+ store::Item_t countVar;
309+ theSctx->expand_qname(countVar, "http://zorba.io/internals", "", "count", loc);
310+ var_expr* varExpr = bind_var(loc, countVar, var_expr::count_var, NULL);
311+ count_clause* countClause = theExprManager->create_count_clause(theRootSctx,
312+ loc,
313+ varExpr);
314+ theFlworClausesStack.push_back(countClause);
315+
316+ //4. Create (offset_expr + limit_expr) expr
317+ function* add = BUILTIN_FUNC(OP_ADD_2);
318+ expr* limitPlusOffsetExpr = theExprManager->create_fo_expr(theRootSctx, theUDF, loc, add, theOffsetExpr, limitExpr);
319+
320+ //3. Create WhereExpr
321+ function* f = BUILTIN_FUNC(OP_LESS_2);
322+ expr* left = lookup_var(countVar, loc, true);
323+ expr* right = limitPlusOffsetExpr;
324+ expr* whereExpr = theExprManager->create_fo_expr(theRootSctx, theUDF, loc, f, left, right);
325+
326+ //4. Add WhereClause
327+ whereExpr = wrap_in_bev(whereExpr);
328+ wrap_in_debugger_expr(whereExpr, whereExpr->get_loc());
329+ where_clause* clause = theExprManager->create_where_clause(theRootSctx,
330+ loc,
331+ whereExpr);
332+ theFlworClausesStack.push_back(clause);
333+}
334
335 /*******************************************************************************
336 CountClause ::= "count" "$" VarName
337
338=== added directory 'test/rbkt/ExpQueryResults/zorba/offset-limit'
339=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res'
340--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res 1970-01-01 00:00:00 +0000
341+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res 2013-07-19 07:43:31 +0000
342@@ -0,0 +1,1 @@
343+5 6
344
345=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res'
346--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res 1970-01-01 00:00:00 +0000
347+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res 2013-07-19 07:43:31 +0000
348@@ -0,0 +1,1 @@
349+5 6 7 8 9 10
350
351=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res'
352--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res 1970-01-01 00:00:00 +0000
353+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res 2013-07-19 07:43:31 +0000
354@@ -0,0 +1,1 @@
355+1 2 3 4 5
356
357=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res'
358--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res 1970-01-01 00:00:00 +0000
359+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res 2013-07-19 07:43:31 +0000
360@@ -0,0 +1,1 @@
361+
362
363=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-5.xml.res'
364--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-5.xml.res 1970-01-01 00:00:00 +0000
365+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-5.xml.res 2013-07-19 07:43:31 +0000
366@@ -0,0 +1,1 @@
367+3
368
369=== added directory 'test/rbkt/Queries/zorba/offset-limit'
370=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq'
371--- test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq 1970-01-01 00:00:00 +0000
372+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq 2013-07-19 07:43:31 +0000
373@@ -0,0 +1,4 @@
374+for $i in (1 to 10)
375+offset 5
376+limit 2
377+return $i
378
379=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq'
380--- test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq 1970-01-01 00:00:00 +0000
381+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq 2013-07-19 07:43:31 +0000
382@@ -0,0 +1,3 @@
383+for $i in (1 to 10)
384+offset 5
385+return $i
386
387=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq'
388--- test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq 1970-01-01 00:00:00 +0000
389+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq 2013-07-19 07:43:31 +0000
390@@ -0,0 +1,3 @@
391+for $i in (1 to 10)
392+limit 5
393+return $i
394
395=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq'
396--- test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq 1970-01-01 00:00:00 +0000
397+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq 2013-07-19 07:43:31 +0000
398@@ -0,0 +1,7 @@
399+for $i in (1 to 10)
400+offset 2
401+limit 5
402+limit 2
403+offset 5
404+limit 1
405+return $i
406
407=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-5.xq'
408--- test/rbkt/Queries/zorba/offset-limit/offset-limit-5.xq 1970-01-01 00:00:00 +0000
409+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-5.xq 2013-07-19 07:43:31 +0000
410@@ -0,0 +1,7 @@
411+for $i in (1 to 10)
412+offset 2
413+limit 5
414+limit 2
415+offset 2
416+limit 1
417+return $i

Subscribers

People subscribed via source and target branches