asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jianfeng Jia <jianfeng....@gmail.com>
Subject Re: Did we change the response format of the HTTP Query API?
Date Wed, 04 Nov 2015 18:57:20 GMT
I see it now. To answer my previous question, most of the test case are comparing the ADM results.
In order to generate the JSON format result, we need to set the “output-dir.compare” attribute
to “Clean-JSON” as  following. 
Now I know which test cases I should look into. Thank you.
<test-case FilePath="json">
    <compilation-unit name="int01">
        <output-dir compare="Clean-JSON">int01-cleanjson</output-dir>
    </compilation-unit>
</test-case>



> On Nov 4, 2015, at 8:20 AM, Till Westmann <tillw@apache.org> wrote:
> 
> All of the AQL tests go through the HTTP API.
> I think that’s what Chris is referring to.
> Take a look at e.g. TestExecutor.executeQuery.
> 
> Cheers,
> Till
> 
> On 3 Nov 2015, at 14:22, Jianfeng Jia wrote:
> 
>> Great, could you show me where the HTTP tests are? I'd like to check it to
>> see if I can make the current demo works. Thank you.
>> 
>> On Tue, Nov 3, 2015 at 2:10 PM, Chris Hillery <chillery@hillery.land> wrote:
>> 
>>> There are hundreds of test cases using the HTTP API, don't worry. The
>>> problem is we don't automatically test our supplied examples.
>>> 
>>> Ceej
>>> On Nov 3, 2015 2:01 PM, "Jianfeng Jia" <jianfeng.jia@gmail.com> wrote:
>>> 
>>>> Good to know. Since the HTTP API is the only programmable interface now,
>>>> we'd better at least have some HTTP request/response test cases.
>>>> 
>>>> On Tue, Nov 3, 2015 at 1:54 PM, Chris Hillery <chillery@hillery.land>
>>>> wrote:
>>>> 
>>>>> Yes, the output format changed - more than a year ago now. I did recently
>>>>> notice that the documentation was out of date, and I will fix that. As
>>>>> for
>>>>> the examples, I was unaware of those, but clearly those need to be
>>>>> updated
>>>>> as well. We should probably ensure that all of our examples can be run
as
>>>>> part of a build, to prevent them breaking.
>>>>> 
>>>>> Ceej
>>>>> aka Chris Hillery
>>>>> 
>>>>> On Tue, Nov 3, 2015 at 1:40 PM, Jianfeng Jia <jianfeng.jia@gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> Dear Devs,
>>>>>> 
>>>>>> I just noticed that the HTTP response format from current master
is
>>>>>> different from the master's documentation page(
>>>>>> 
>>>>> https://asterix-jenkins.ics.uci.edu/job/asterix-test-full/site/asterix-doc/api.html#QueryApi
>>>>>> <
>>>>>> 
>>>>> https://asterix-jenkins.ics.uci.edu/job/asterix-test-full/site/asterix-doc/api.html#QueryApi
>>>>>> ).
>>>>>> The documentation says it was wrapped by a json dictionary as
>>>>> following:
>>>>>> 
>>>>>> {
>>>>>>   "results": [
>>>>>>       [
>>>>>>           "{ "id": 123, "name": "John Doe" }"
>>>>>>       ]
>>>>>>   ]
>>>>>> }
>>>>>> But what I got from
>>>>>> 
>>>>> http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(
>>>>>> ‘Employee’)%20return%20$l;
>>>>>> is just an array (as we produced in the Asterix web interface)
>>>>>> [
>>>>>>           { "id": 123, "name": "John Doe" }
>>>>>>       ]
>>>>>> It breaks the asterix-examples javascript demos. So I want to ask
that
>>>>> the
>>>>>> HTTP response changes was intended or not. If so we should update
the
>>>>>> documentation and the corresponding javascript demos. Otherwise we
>>>>> should
>>>>>> bring back the old response format.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Best,
>>>>>> 
>>>>>> Jianfeng Jia
>>>>>> PhD Candidate of Computer Science
>>>>>> University of California, Irvine
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> 
>>>> -----------------
>>>> Best Regards
>>>> 
>>>> Jianfeng Jia
>>>> Ph.D. Candidate of Computer Science
>>>> University of California, Irvine
>>>> 
>>> 
>> 
>> 
>> -- 
>> 
>> -----------------
>> Best Regards
>> 
>> Jianfeng Jia
>> Ph.D. Candidate of Computer Science
>> University of California, Irvine



Best,

Jianfeng Jia
PhD Candidate of Computer Science
University of California, Irvine


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message