Hi, I have updated a PR[1] with the suggested changes.
[1] https://github.com/apache/vxquery/pull/128 Thank you. Yours sincerely, Riyafa On 2 August 2016 at 09:24, Till Westmann <[email protected]> wrote: > Hi Riyafa, hi Christina, > > looking at the PRs for > > - libjn:descendant-objects [1] > - libjn:descendant-arrays [2] > - libjn:descendant-pairs [3] > > it seems that there is (not surprisingly) a lot of overlap. > I think that it would be good to extract the common code that navigates > through the JSON items into an AbstractJsonItemScalarEvaluator. > I’d expect this abstract evaluator could implement everything for these 3 > evaluators with the exception of one abstract "processPair" and one > abstract "processArray" method (the rest of the code could probably be > taken > straight out of [3] with renaming "nestedObject" to "processObject" and > "insideArray" to "processArray") > > Does this make sense? > > If so, maybe Riyafa could go ahead and implement descendant-objects and > descendant-pairs based on an AbstractJsonItemScalarEvaluator and then > Christina would re-implement descendant-arrays based on Riyafa's > implementation? > > Cheers, > Till > > [1] https://github.com/apache/vxquery/pull/128 > [2] https://github.com/apache/vxquery/pull/129 > [3] https://github.com/apache/vxquery/pull/130 > -- Riyafa Abdul Hameed Undergraduate, University of Moratuwa Email: [email protected] Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/> <http://facebook.com/riyafa.ahf> <http://lk.linkedin.com/in/riyafa> <http://twitter.com/Riyafa1>
