You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vxquery.apache.org by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk> on 2016/07/19 11:04:42 UTC

Changes to value comparison semantics for JSONiq

Hi,

I have made Changes to value comparison semantics for JSONiq[1].

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

Thank you.

Yours sincerely,
Riyafa

-- 
Riyafa Abdul Hameed
Undergraduate, University of Moratuwa

Email: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Preston Carman <pr...@apache.org>.
The issue comes from null can be compared to all data types. I guess I
would then remove the else statement since the if has a return statement
and the code review will then only show the changes you made instead of
indenting the whole switch statement.



On Mon, Jul 25, 2016 at 10:07 AM, Riyafa Abdul Hameed <
riyafa.12@cse.mrt.ac.lk> wrote:

> Hi,
>
> I added the tests for all comparison checks (eq, ne, lt, gt, ge, le) as
> suggested[1]. Here I have used an if statement in the FunctionHelper
> class instead of checking for null tag inside switch statements because it
> would be tedious to add the null tag to all the switch statements for the
> tid2 tag. Shall I proceed to attempt to add the null tag into all the
> switch statements or leave it as a if check?
>
> [1] https://github.com/apache/vxquery/pull/109
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
>
> On 19 July 2016 at 16:34, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
> wrote:
>
>> Hi,
>>
>> I have made Changes to value comparison semantics for JSONiq[1].
>>
>> [1] https://github.com/apache/vxquery/pull/109
>>
>> Thank you.
>>
>> Yours sincerely,
>> Riyafa
>>
>> --
>> Riyafa Abdul Hameed
>> Undergraduate, University of Moratuwa
>>
>> Email: riyafa.12@cse.mrt.ac.lk
>> 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: riyafa.12@cse.mrt.ac.lk
> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
> <http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
> <http://twitter.com/Riyafa1>
>

Re: Changes to value comparison semantics for JSONiq

Posted by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>.
Hi,

I have squashed the commits to be merged[1].

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

Thank you.

Yours sincerely,
Riyafa

On 26 July 2016 at 19:40, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
wrote:

> Hi,
>
> I have managed to create a PR[1] with no conflicts.
>
> [1] https://github.com/apache/vxquery/pull/118
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
> On 26 July 2016 at 10:23, Till Westmann <ti...@apache.org> wrote:
>
>> Hi Riyafa,
>>
>> this PR also contains a number of changes that are already in master.
>> Somehow it seems that we’ve managed to confuse some git repositories.
>>
>> Cheers,
>> Till
>>
>>
>> On 25 Jul 2016, at 19:17, Riyafa Abdul Hameed wrote:
>>
>> Hi,
>>>
>>> I also added the changes to general comparison semantics to the same
>>> PR[1].
>>>
>>> [1] https://github.com/apache/vxquery/pull/109
>>>
>>> Thank you.
>>>
>>> Yours sincerely,
>>> Riyafa
>>>
>>> On 26 July 2016 at 06:44, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> I removed the else tag and now only have the if tag[1]. I will do some
>>>> refactoring because it has conflicts with the master once the code is
>>>> reviewed.
>>>>
>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>
>>>> Thank you.
>>>>
>>>> Yours sinerely,
>>>> Riyafa
>>>>
>>>> On 26 July 2016 at 00:15, Till Westmann <ti...@apache.org> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I think that - even though it’s probably slower - it’s fine to keep the
>>>>> null
>>>>> check separate. The reason for me is that, it’s probably less error
>>>>> prone
>>>>> this way (and we can’t forget to add it to one of the sub-switches)
>>>>> and it
>>>>> clearly communicates intent in the code.
>>>>> A hybrid solution could be to add the tid2 null check before and add
>>>>> the
>>>>> tid1 check in the top-level switch. But that would need to be nicely
>>>>> documented as the asymmetry could be confusing otherwise.
>>>>>
>>>>> My 2c,
>>>>> Till
>>>>>
>>>>> On 25 Jul 2016, at 10:07, Riyafa Abdul Hameed wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>>
>>>>>> I added the tests for all comparison checks (eq, ne, lt, gt, ge, le)
>>>>>> as
>>>>>> suggested[1]. Here I have used an if statement in the FunctionHelper
>>>>>> class
>>>>>> instead of checking for null tag inside switch statements because it
>>>>>> would
>>>>>> be tedious to add the null tag to all the switch statements for the
>>>>>> tid2
>>>>>> tag. Shall I proceed to attempt to add the null tag into all the
>>>>>> switch
>>>>>> statements or leave it as a if check?
>>>>>>
>>>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> Yours sincerely,
>>>>>> Riyafa
>>>>>>
>>>>>>
>>>>>> On 19 July 2016 at 16:34, Riyafa Abdul Hameed <
>>>>>> riyafa.12@cse.mrt.ac.lk>
>>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>>
>>>>>>> I have made Changes to value comparison semantics for JSONiq[1].
>>>>>>>
>>>>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> Yours sincerely,
>>>>>>> Riyafa
>>>>>>>
>>>>>>> --
>>>>>>> Riyafa Abdul Hameed
>>>>>>> Undergraduate, University of Moratuwa
>>>>>>>
>>>>>>> Email: riyafa.12@cse.mrt.ac.lk
>>>>>>> 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: riyafa.12@cse.mrt.ac.lk
>>>>>> 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: riyafa.12@cse.mrt.ac.lk
>>>> 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: riyafa.12@cse.mrt.ac.lk
>>> 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: riyafa.12@cse.mrt.ac.lk
> 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: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>.
Hi,

I have managed to create a PR[1] with no conflicts.

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

Thank you.

Yours sincerely,
Riyafa

On 26 July 2016 at 10:23, Till Westmann <ti...@apache.org> wrote:

> Hi Riyafa,
>
> this PR also contains a number of changes that are already in master.
> Somehow it seems that we’ve managed to confuse some git repositories.
>
> Cheers,
> Till
>
>
> On 25 Jul 2016, at 19:17, Riyafa Abdul Hameed wrote:
>
> Hi,
>>
>> I also added the changes to general comparison semantics to the same
>> PR[1].
>>
>> [1] https://github.com/apache/vxquery/pull/109
>>
>> Thank you.
>>
>> Yours sincerely,
>> Riyafa
>>
>> On 26 July 2016 at 06:44, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
>> wrote:
>>
>> Hi,
>>>
>>> I removed the else tag and now only have the if tag[1]. I will do some
>>> refactoring because it has conflicts with the master once the code is
>>> reviewed.
>>>
>>> [1] https://github.com/apache/vxquery/pull/109
>>>
>>> Thank you.
>>>
>>> Yours sinerely,
>>> Riyafa
>>>
>>> On 26 July 2016 at 00:15, Till Westmann <ti...@apache.org> wrote:
>>>
>>> Hi,
>>>>
>>>> I think that - even though it’s probably slower - it’s fine to keep the
>>>> null
>>>> check separate. The reason for me is that, it’s probably less error
>>>> prone
>>>> this way (and we can’t forget to add it to one of the sub-switches) and
>>>> it
>>>> clearly communicates intent in the code.
>>>> A hybrid solution could be to add the tid2 null check before and add the
>>>> tid1 check in the top-level switch. But that would need to be nicely
>>>> documented as the asymmetry could be confusing otherwise.
>>>>
>>>> My 2c,
>>>> Till
>>>>
>>>> On 25 Jul 2016, at 10:07, Riyafa Abdul Hameed wrote:
>>>>
>>>> Hi,
>>>>
>>>>>
>>>>> I added the tests for all comparison checks (eq, ne, lt, gt, ge, le) as
>>>>> suggested[1]. Here I have used an if statement in the FunctionHelper
>>>>> class
>>>>> instead of checking for null tag inside switch statements because it
>>>>> would
>>>>> be tedious to add the null tag to all the switch statements for the
>>>>> tid2
>>>>> tag. Shall I proceed to attempt to add the null tag into all the switch
>>>>> statements or leave it as a if check?
>>>>>
>>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Yours sincerely,
>>>>> Riyafa
>>>>>
>>>>>
>>>>> On 19 July 2016 at 16:34, Riyafa Abdul Hameed <riyafa.12@cse.mrt.ac.lk
>>>>> >
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>>
>>>>>> I have made Changes to value comparison semantics for JSONiq[1].
>>>>>>
>>>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> Yours sincerely,
>>>>>> Riyafa
>>>>>>
>>>>>> --
>>>>>> Riyafa Abdul Hameed
>>>>>> Undergraduate, University of Moratuwa
>>>>>>
>>>>>> Email: riyafa.12@cse.mrt.ac.lk
>>>>>> 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: riyafa.12@cse.mrt.ac.lk
>>>>> 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: riyafa.12@cse.mrt.ac.lk
>>> 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: riyafa.12@cse.mrt.ac.lk
>> 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: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Till Westmann <ti...@apache.org>.
Hi Riyafa,

this PR also contains a number of changes that are already in master.
Somehow it seems that we\u2019ve managed to confuse some git repositories.

Cheers,
Till

On 25 Jul 2016, at 19:17, Riyafa Abdul Hameed wrote:

> Hi,
>
> I also added the changes to general comparison semantics to the same 
> PR[1].
>
> [1] https://github.com/apache/vxquery/pull/109
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
> On 26 July 2016 at 06:44, Riyafa Abdul Hameed 
> <ri...@cse.mrt.ac.lk>
> wrote:
>
>> Hi,
>>
>> I removed the else tag and now only have the if tag[1]. I will do 
>> some
>> refactoring because it has conflicts with the master once the code is
>> reviewed.
>>
>> [1] https://github.com/apache/vxquery/pull/109
>>
>> Thank you.
>>
>> Yours sinerely,
>> Riyafa
>>
>> On 26 July 2016 at 00:15, Till Westmann <ti...@apache.org> wrote:
>>
>>> Hi,
>>>
>>> I think that - even though it\u2019s probably slower - it\u2019s fine to 
>>> keep the
>>> null
>>> check separate. The reason for me is that, it\u2019s probably less 
>>> error prone
>>> this way (and we can\u2019t forget to add it to one of the 
>>> sub-switches) and it
>>> clearly communicates intent in the code.
>>> A hybrid solution could be to add the tid2 null check before and add 
>>> the
>>> tid1 check in the top-level switch. But that would need to be nicely
>>> documented as the asymmetry could be confusing otherwise.
>>>
>>> My 2c,
>>> Till
>>>
>>> On 25 Jul 2016, at 10:07, Riyafa Abdul Hameed wrote:
>>>
>>> Hi,
>>>>
>>>> I added the tests for all comparison checks (eq, ne, lt, gt, ge, 
>>>> le) as
>>>> suggested[1]. Here I have used an if statement in the 
>>>> FunctionHelper
>>>> class
>>>> instead of checking for null tag inside switch statements because 
>>>> it
>>>> would
>>>> be tedious to add the null tag to all the switch statements for the 
>>>> tid2
>>>> tag. Shall I proceed to attempt to add the null tag into all the 
>>>> switch
>>>> statements or leave it as a if check?
>>>>
>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>
>>>> Thank you.
>>>>
>>>> Yours sincerely,
>>>> Riyafa
>>>>
>>>>
>>>> On 19 July 2016 at 16:34, Riyafa Abdul Hameed 
>>>> <ri...@cse.mrt.ac.lk>
>>>> wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I have made Changes to value comparison semantics for JSONiq[1].
>>>>>
>>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Yours sincerely,
>>>>> Riyafa
>>>>>
>>>>> --
>>>>> Riyafa Abdul Hameed
>>>>> Undergraduate, University of Moratuwa
>>>>>
>>>>> Email: riyafa.12@cse.mrt.ac.lk
>>>>> 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: riyafa.12@cse.mrt.ac.lk
>>>> 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: riyafa.12@cse.mrt.ac.lk
>> 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: riyafa.12@cse.mrt.ac.lk
> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
> <http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
> <http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>.
Hi,

I also added the changes to general comparison semantics to the same PR[1].

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

Thank you.

Yours sincerely,
Riyafa

On 26 July 2016 at 06:44, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
wrote:

> Hi,
>
> I removed the else tag and now only have the if tag[1]. I will do some
> refactoring because it has conflicts with the master once the code is
> reviewed.
>
> [1] https://github.com/apache/vxquery/pull/109
>
> Thank you.
>
> Yours sinerely,
> Riyafa
>
> On 26 July 2016 at 00:15, Till Westmann <ti...@apache.org> wrote:
>
>> Hi,
>>
>> I think that - even though it’s probably slower - it’s fine to keep the
>> null
>> check separate. The reason for me is that, it’s probably less error prone
>> this way (and we can’t forget to add it to one of the sub-switches) and it
>> clearly communicates intent in the code.
>> A hybrid solution could be to add the tid2 null check before and add the
>> tid1 check in the top-level switch. But that would need to be nicely
>> documented as the asymmetry could be confusing otherwise.
>>
>> My 2c,
>> Till
>>
>> On 25 Jul 2016, at 10:07, Riyafa Abdul Hameed wrote:
>>
>> Hi,
>>>
>>> I added the tests for all comparison checks (eq, ne, lt, gt, ge, le) as
>>> suggested[1]. Here I have used an if statement in the FunctionHelper
>>> class
>>> instead of checking for null tag inside switch statements because it
>>> would
>>> be tedious to add the null tag to all the switch statements for the tid2
>>> tag. Shall I proceed to attempt to add the null tag into all the switch
>>> statements or leave it as a if check?
>>>
>>> [1] https://github.com/apache/vxquery/pull/109
>>>
>>> Thank you.
>>>
>>> Yours sincerely,
>>> Riyafa
>>>
>>>
>>> On 19 July 2016 at 16:34, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> I have made Changes to value comparison semantics for JSONiq[1].
>>>>
>>>> [1] https://github.com/apache/vxquery/pull/109
>>>>
>>>> Thank you.
>>>>
>>>> Yours sincerely,
>>>> Riyafa
>>>>
>>>> --
>>>> Riyafa Abdul Hameed
>>>> Undergraduate, University of Moratuwa
>>>>
>>>> Email: riyafa.12@cse.mrt.ac.lk
>>>> 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: riyafa.12@cse.mrt.ac.lk
>>> 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: riyafa.12@cse.mrt.ac.lk
> 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: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>.
Hi,

I removed the else tag and now only have the if tag[1]. I will do some
refactoring because it has conflicts with the master once the code is
reviewed.

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

Thank you.

Yours sinerely,
Riyafa

On 26 July 2016 at 00:15, Till Westmann <ti...@apache.org> wrote:

> Hi,
>
> I think that - even though it’s probably slower - it’s fine to keep the
> null
> check separate. The reason for me is that, it’s probably less error prone
> this way (and we can’t forget to add it to one of the sub-switches) and it
> clearly communicates intent in the code.
> A hybrid solution could be to add the tid2 null check before and add the
> tid1 check in the top-level switch. But that would need to be nicely
> documented as the asymmetry could be confusing otherwise.
>
> My 2c,
> Till
>
> On 25 Jul 2016, at 10:07, Riyafa Abdul Hameed wrote:
>
> Hi,
>>
>> I added the tests for all comparison checks (eq, ne, lt, gt, ge, le) as
>> suggested[1]. Here I have used an if statement in the FunctionHelper class
>> instead of checking for null tag inside switch statements because it would
>> be tedious to add the null tag to all the switch statements for the tid2
>> tag. Shall I proceed to attempt to add the null tag into all the switch
>> statements or leave it as a if check?
>>
>> [1] https://github.com/apache/vxquery/pull/109
>>
>> Thank you.
>>
>> Yours sincerely,
>> Riyafa
>>
>>
>> On 19 July 2016 at 16:34, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
>> wrote:
>>
>> Hi,
>>>
>>> I have made Changes to value comparison semantics for JSONiq[1].
>>>
>>> [1] https://github.com/apache/vxquery/pull/109
>>>
>>> Thank you.
>>>
>>> Yours sincerely,
>>> Riyafa
>>>
>>> --
>>> Riyafa Abdul Hameed
>>> Undergraduate, University of Moratuwa
>>>
>>> Email: riyafa.12@cse.mrt.ac.lk
>>> 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: riyafa.12@cse.mrt.ac.lk
>> 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: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Till Westmann <ti...@apache.org>.
Hi,

I think that - even though it\u2019s probably slower - it\u2019s fine to keep 
the null
check separate. The reason for me is that, it\u2019s probably less error 
prone
this way (and we can\u2019t forget to add it to one of the sub-switches) 
and it
clearly communicates intent in the code.
A hybrid solution could be to add the tid2 null check before and add the
tid1 check in the top-level switch. But that would need to be nicely
documented as the asymmetry could be confusing otherwise.

My 2c,
Till

On 25 Jul 2016, at 10:07, Riyafa Abdul Hameed wrote:

> Hi,
>
> I added the tests for all comparison checks (eq, ne, lt, gt, ge, le) 
> as
> suggested[1]. Here I have used an if statement in the FunctionHelper 
> class
> instead of checking for null tag inside switch statements because it 
> would
> be tedious to add the null tag to all the switch statements for the 
> tid2
> tag. Shall I proceed to attempt to add the null tag into all the 
> switch
> statements or leave it as a if check?
>
> [1] https://github.com/apache/vxquery/pull/109
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
>
> On 19 July 2016 at 16:34, Riyafa Abdul Hameed 
> <ri...@cse.mrt.ac.lk>
> wrote:
>
>> Hi,
>>
>> I have made Changes to value comparison semantics for JSONiq[1].
>>
>> [1] https://github.com/apache/vxquery/pull/109
>>
>> Thank you.
>>
>> Yours sincerely,
>> Riyafa
>>
>> --
>> Riyafa Abdul Hameed
>> Undergraduate, University of Moratuwa
>>
>> Email: riyafa.12@cse.mrt.ac.lk
>> 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: riyafa.12@cse.mrt.ac.lk
> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
> <http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
> <http://twitter.com/Riyafa1>

Re: Changes to value comparison semantics for JSONiq

Posted by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>.
Hi,

I added the tests for all comparison checks (eq, ne, lt, gt, ge, le) as
suggested[1]. Here I have used an if statement in the FunctionHelper class
instead of checking for null tag inside switch statements because it would
be tedious to add the null tag to all the switch statements for the tid2
tag. Shall I proceed to attempt to add the null tag into all the switch
statements or leave it as a if check?

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

Thank you.

Yours sincerely,
Riyafa


On 19 July 2016 at 16:34, Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>
wrote:

> Hi,
>
> I have made Changes to value comparison semantics for JSONiq[1].
>
> [1] https://github.com/apache/vxquery/pull/109
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
> --
> Riyafa Abdul Hameed
> Undergraduate, University of Moratuwa
>
> Email: riyafa.12@cse.mrt.ac.lk
> 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: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>