Hi,

I have made the suggested changes and written the test cases [1]. One issue
which I have raised in a separate thread is that I couldn't test boolean
values inside objects.

[1] https://github.com/apache/vxquery/pull/55

Thank you.

Yours sincerely,
Riyafa


On 10 June 2016 at 21:42, Riyafa Abdul Hameed <[email protected]>
wrote:

> Hi,
>
> I have merged the changes from master in the pull request [1]. I would
> soon add the tests.
>
> [1] https://github.com/apache/vxquery/pull/55
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
> On 10 June 2016 at 09:07, Preston Carman <[email protected]> wrote:
>
>> The array constructor patch has been merged with master.
>>
>> Riyafa, Please rebase/merge your branch with master. You will also
>> find an example test query Christina set up. You can use this as
>> starting point to add your object query tests.
>>
>> Thanks,
>> Preston
>>
>> On Thu, Jun 9, 2016 at 7:23 PM, Christina Pavlopoulou <[email protected]>
>> wrote:
>> > Hi,
>> >
>> > I made some further changes to the array runtime constructor and I added
>> > some test cases for it [1]. I, also, added a framework for Riyafa's test
>> > cases for the object. The test cases that I added consist of the
>> following 4
>> > cases:
>> >
>> > 1. an array with a single item
>> > 2. an array with a sequence of items
>> > 3. an array with nested arrays
>> > 4. an empty array
>> >
>> > All the tests run and print the correct results.
>> >
>> > [1] https://github.com/apache/vxquery/pull/54
>> >
>> > Thank you,
>> > Christina
>> >
>> > On 06/09/2016 07:25 AM, Till Westmann wrote:
>> >>
>> >> Hi,
>> >>
>> >> I’ve also just added a few comments here.
>> >>
>> >> Cheers,
>> >> Till
>> >>
>> >> On 8 Jun 2016, at 21:20, Christina Pavlopoulou wrote:
>> >>
>> >>> Hello,
>> >>>
>> >>> I implemented the array runtime constructor and the printer and it
>> looks
>> >>> to print correctly. The code is here [1]
>> >>>
>> >>> [1] https://github.com/apache/vxquery/pull/52
>> >>>
>> >>> Thank you,
>> >>> Christina
>> >>>
>> >>> On 06/07/2016 05:05 PM, Till Westmann wrote:
>> >>>>
>> >>>> Hi Riyafa,
>> >>>>
>> >>>> this looks very good!
>> >>>> I’ve added a few comments on improvements and generalizations, but we
>> >>>> are
>> >>>> mostly there.
>> >>>> Once you've addressed my comments we should also be able to use
>> >>>> constructors
>> >>>> like
>> >>>>
>> >>>>     { "a": xs:date("2016-06-07"), "b": 2 }
>> >>>>
>> >>>> Wrt the test, I think that we should create a new test catalog
>> similar
>> >>>> to
>> >>>>
>> >>>>     ./vxquery-xtest/src/test/resources/VXQueryCatalog.xml
>> >>>>
>> >>>> with tests for JSONiq. I don't remember of the top of my head what is
>> >>>> needed
>> >>>> to do that, but maybe you can find out by looking at it (or somebody
>> >>>> else on
>> >>>> the list could provide some more guidance :) ).
>> >>>>
>> >>>> Cheers,
>> >>>> Till
>> >>>>
>> >>>> On 6 Jun 2016, at 13:14, Riyafa Abdul Hameed wrote:
>> >>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> Thanks Till. I have implemented the runtime for objects[1], but I am
>> >>>>> not
>> >>>>> sure of the implementation though it is working and the Object is
>> >>>>> printed
>> >>>>> in the console from the XMLSerializer class. I think this
>> >>>>> implementation
>> >>>>> needs improvements and testing. I would like to know how/where to
>> write
>> >>>>> test classes for the implementation. Also please let me know if the
>> >>>>> implementation is correct.
>> >>>>>
>> >>>>> [1] https://github.com/apache/vxquery/pull/51
>> >>>>>
>> >>>>> Thank you.
>> >>>>>
>> >>>>> Yours sincerely,
>> >>>>> Riyafa
>> >>>>>
>> >>>>> On 3 June 2016 at 03:43, Till Westmann <[email protected]> wrote:
>> >>>>>
>> >>>>>> Hi Riyafa,
>> >>>>>>
>> >>>>>> I think that the sample that I pointed you to might not have been
>> the
>> >>>>>> best
>> >>>>>> one as it depends on methods that are available in superclasses
>> that
>> >>>>>> do
>> >>>>>> common work for the node constructors.
>> >>>>>>
>> >>>>>> The top level contract for the evaluators is IScalarEvaluator and
>> that
>> >>>>>> only
>> >>>>>> has one method
>> >>>>>>
>> >>>>>>     void evaluate(IFrameTupleReference tuple, IPointable result)
>> >>>>>>
>> >>>>>> which takes in a IFrameTupleReference (that provides a value for
>> each
>> >>>>>> variable in the tuple) and an IPointable that should point to the
>> >>>>>> (scalar)
>> >>>>>> result after evaluation.
>> >>>>>>
>> >>>>>> The abstract class AbstractTaggedValueArgumentScalarEvaluator
>> factors
>> >>>>>> out
>> >>>>>> some common code for the common pattern that most of our evaluators
>> >>>>>> follow:
>> >>>>>> 1) pass n IScalarEvaluator to the constructor
>> >>>>>> 2) evaluate each of those (argument) scalar evaluators on each
>> >>>>>>    IFrameTupleReference that is passed to an evaluate call to get n
>> >>>>>> result
>> >>>>>>    values for each tuple
>> >>>>>> 3) pass those n values (stored in a TaggedValuePointable array) on
>> to
>> >>>>>> a
>> >>>>>>    simpler evaluate-method that is declared in
>> >>>>>>    AbstractTaggedValueArgumentScalarEvaluator and implemented in
>> the
>> >>>>>>    subclasses.
>> >>>>>>
>> >>>>>> The AbstractNodeConstructorScalarEvaluator then refines this even
>> more
>> >>>>>> for
>> >>>>>> nodes, but I think that that's not helpful for our object (or
>> array)
>> >>>>>> constructors as we e.g. don't consider using dictionaries for those
>> >>>>>> for
>> >>>>>> now.
>> >>>>>>
>> >>>>>> Does this help/make sense?
>> >>>>>>
>> >>>>>> Cheers,
>> >>>>>> Till
>> >>>>>>
>> >>>>>> On 2 Jun 2016, at 7:22, Riyafa Abdul Hameed wrote:
>> >>>>>>
>> >>>>>>> Hi again,
>> >>>>>>>
>> >>>>>>> Sorry about my ignorance. On attempting to implement the
>> >>>>>>> ObjectNodeConstructorScalarEvaluator I have started wondering
>> about
>> >>>>>>> the
>> >>>>>>> arguments passed to the method constructNode--I am not sure how I
>> >>>>>>> could
>> >>>>>>> find out what would be passed as arguments for the method in
>> >>>>>>> ObjectNodeConstructorScalarEvaluator. Can I assume key and value
>> pair
>> >>>>>>
>> >>>>>> would
>> >>>>>>>
>> >>>>>>> be passed as the TaggedValuePointable[] argument? Or where is this
>> >>>>>>> method
>> >>>>>>> used and how can I find out about the arguments? I have also tried
>> >>>>>>> debugging to no avail. Again sorry about the ignorance. I read the
>> >>>>>>
>> >>>>>> paper[1]
>> >>>>>>>
>> >>>>>>> and still couldn't get a grasp of what's happening (I will read
>> again
>> >>>>>>> to
>> >>>>>>> see if I could figure it out)
>> >>>>>>>
>> >>>>>>> [1] http://dl.acm.org/citation.cfm?id=2806941
>> >>>>>>>
>> >>>>>>> Thank you.
>> >>>>>>>
>> >>>>>>> Yours sincerely,
>> >>>>>>> Riyafa
>> >>>>>>>
>> >>>>>>> On 2 June 2016 at 10:43, Riyafa Abdul Hameed
>> >>>>>>> <[email protected]>
>> >>>>>>> wrote:
>> >>>>>>>
>> >>>>>>>> Hi,
>> >>>>>>>>
>> >>>>>>>> When attempting to implement runtime operators for Object
>> >>>>>>
>> >>>>>> implementation,
>> >>>>>>>>
>> >>>>>>>> I have come across the following issues:
>> >>>>>>>>
>> >>>>>>>>    - Should there be a ConstructorScalarEvaluator for
>> >>>>>>>> PairConstructor?
>> >>>>>>>>    - Should I be checking if the keys are unique in the
>> >>>>>>>>    ObjectNodeConstructorScalarEvaluator?
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> Thank you.
>> >>>>>>>>
>> >>>>>>>> Yours sincerely,
>> >>>>>>>>
>> >>>>>>>> Riyafa
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> --
>> >>>>>>>> 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>
>> >>>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> --
>> >>>>>>> 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>
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> 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>
>> >
>> >
>>
>
>
>
> --
> 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>
>



-- 
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>

Reply via email to