Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
PR superseed by https://github.com/28msec/zorba/pull/7 -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/175747 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/175747 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
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? -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
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. -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
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? -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
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 -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
Review: Needs Fixing -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
Review: Needs Information 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? -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
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). -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp