Clone
Ali Alsuliman <ali.al.solaiman@gmail.com>
committed
on 05 Nov
[ASTERIXDB-2672][API] Change the valid values for "format" request parameter
- user model changes: yes
- storage format changes: no
- interf… Show more
[ASTERIXDB-2672][API] Change the valid values for "format" request parameter

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Allowed values for "format" request parameter: json, csv, adm.

- Recognizable format values in "Accept":

 application/x-adm

 application/json

 application/json;lossless=true/false

 text/csv

 text/csv;header=present/absent

Test framework changes:

- ResultExtractor: if the OutputFormat is json/lossless-json, print the "result"

 field of the response similar to how adm would be printed, one json value

 per line (and using same spacing).

- Changed some queries that use "EXPLAIN SELECT..." and specify OutputFormat as JSON.

 The queries extension is ".plans.sqlpp". "param optimized-logical-plan:string=true"

 is specified in those queries to print the logical plan in the "plans" field of

 the response.

- added "// compareunorderedarray=true" for test quries that use .regexjson to compare

 one json value against another where the order of elements in a json array is not

 deterministic.

- TestExecutor: OutputFormat.LOSSLESS_JSON & OutputFormat.CSV_HEADER formats are set

 in the "Accept". Otherwise, the desired format is set in the "format" request

 parameter as usual.

- TestHelper: changed "equalJson()" to allow comparing json array in two modes.

- Removed some test cases that used to set mime types in the "format" request parameter

 since now it's not allowed to do so.

Change-Id: Ie3c7a35446322c2d97679e7e724b9778e2a4ba83

Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4043

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>

Reviewed-by: Murtadha Hubail <mhubail@apache.org>

Show less