Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-22 Thread Markos Zaharioudakis
1. The following query returns the wrong result: jsoniq version 1.0; declare variable $doc1 := { \foo\ : { \name\ : \moto\, \price\ : 100 }, \boo\ : { \name\ : \car\, \price\ : 1000 } } ; ( let $v := exactly-one(jn:parse-json($doc1)) return if ($v.foo.name eq moto) then

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-20 Thread Nicolae Brinza
Paul, I've also addressed your comments on the merge proposal. -- -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to :

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-20 Thread Paul J. Lucas
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 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 :

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-19 Thread Nicolae Brinza
I have fixed issues 1 through 3. Regarding point 4: your approach, if I understood it correctly, will only build the dataflow information, but not the dataguide itself. To compute it, it would require an additional pass through the expression tree and an additional data structure. Regarding

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-05 Thread Markos Zaharioudakis
Review: Needs Fixing 1. The following query constructs the wrong dataguide (and returns the wrong result): jsoniq version 1.0; declare variable $doc1 := { \foo\ : { \name\ : \moto\, \price\ : 100 }, \boo\ : { \name\ : \car\, \price\ : 1000 } } ; let $v :=

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-05 Thread Markos Zaharioudakis
Review: Needs Fixing 1. The following query constructs the wrong dataguide (and returns the wrong result): jsoniq version 1.0; declare variable $doc1 := { \foo\ : { \name\ : \moto\, \price\ : 100 }, \boo\ : { \name\ : \car\, \price\ : 1000 } } ; let $v :=

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-08-02 Thread Paul J. Lucas
Review: Needs Fixing Please match the rest of the code style, e.g.: s/NULL/nullptr/ s/dataguide/dataguide_/ -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list:

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-29 Thread Matthias Brantner
Review: Approve I approve the changes now. I think that this still needs a little work if we start pushing-down the dataguide into collections. -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-26 Thread Nicolae Brinza
I don't understand why. In my example it wouldn't. The count functions could count the number of empty objects or objects that contain only the STREET field. I've looked into the test and here are the issues: 1) The fn:count() does not have the %explores-json annotation. I've confused it with

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-26 Thread Nicolae Brinza
Ok, it wasn't too much work -- I've added a special handler for fn:count() in the dataguide code and now the example you gave prunes all the fields except price. -- -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 Your team Zorba Coders is subscribed to branch

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-26 Thread Nicolae Brinza
I meant the STREET field. I've used price in the testcase. -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-26 Thread Nicolae Brinza
I have no idea what problem this MP is supposed to solve; nor do I know what a data guide is. Paul, I've made some changes to the JSON loader so that it skips creating nodes that are not in a given template (== dataguide). Since you've written the loader, could you please review only the

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-26 Thread Matthias Brantner
Review: Needs Information I don't understand why. In my example it wouldn't. The count functions could count the number of empty objects or objects that contain only the STREET field. I've looked into the test and here are the issues: 1) The fn:count() does not have the %explores-json

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-26 Thread Nicolae Brinza
The way I see this is not a problem with the fn functions. The problem is related to the fact how the objects are used. In this case, the objects are used to construct a new object. The dataguide needs to handle that. Similar to serialization, this means that the entire object is needed. Yes,

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-25 Thread Nicolae Brinza
I have tried some basic queries and there is a huge performance improvement. This is great. However, I detected a memory leak and have one question. - memory leak in translator.cpp:4823 I've fixed it. - In the following query, no dataguide seems to be pushed into the parser. Why? The

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-25 Thread Matthias Brantner
Review: Needs Information - In the following query, no dataguide seems to be pushed into the parser. Why? The count() function is marked with the %explores-json annotation, because pruning objects that reach the function will modify the returned result. That is why the dataguide is

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-25 Thread Paul J. Lucas
Review: Needs Information I have no idea what problem this MP is supposed to solve; nor do I know what a data guide is. -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list:

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-23 Thread Nicolae Brinza
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/use-dataguide/+merge/176385 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 :

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/use-dataguide into lp:zorba

2013-07-23 Thread Matthias Brantner
Review: Needs Fixing I have tried some basic queries and there is a huge performance improvement. This is great. However, I detected a memory leak and have one question. - memory leak in translator.cpp:4823 ==20325== 88 (32 direct, 56 indirect) bytes in 1 blocks are definitely lost in loss