asterixdb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugenia Gabrielova <genia.likes.scie...@gmail.com>
Subject Missing results key with AsterixDB REST API /query
Date Tue, 09 Jun 2015 07:18:47 GMT
*Issue:* Sending a query to the REST API returns a JSON object without the
expected "results" key (
https://asterixdb.ics.uci.edu/documentation/api.html#QueryApi)

*Running Asterix Version: *0.8.7

*To Replicate: *Run the Metadata query in web UI, or from the command line
with curl.
*for $ds in dataset Metadata.Dataset return $ds;*

*Result key missing with JSON results*
$ curl -i -X GET '
http://localhost:19002/query?query=for+%24ds+in+dataset+Metadata.Dataset+return+%24ds%3B'
-H "Accept: application/json"

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Server: Jetty(8.0.0.RC0)

[ { "DataverseName": "Metadata", "DatasetName": "CompactionPolicy",
"DataTypeName": "CompactionPolicyRecordType", "DatasetType": "INTERNAL",
"InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy":
"HASH", "PartitioningKey": { "orderedlist": [ { "orderedlist": [
"DataverseName" ] }, { "orderedlist": [ "CompactionPolicy" ] } ] },
"PrimaryKey": { "orderedlist": [ { "orderedlist": [ "DataverseName" ] }, {
"orderedlist": [ "CompactionPolicy" ] } ] }, "GroupName": "MetadataGroup",
"Autogenerated": false, "CompactionPolicy": "prefix",
"CompactionPolicyProperties": { "orderedlist": [ { "Name":
"max-mergable-component-size", "Value": "1073741824" }, { "Name":
"max-tolerance-component-count", "Value": "5" } ] } }, "ExternalDetails":
null, "Hints": { "unorderedlist": [  ] }, "Timestamp": "Sun Apr 19 16:41:50
PDT 2015", "DatasetId": { "int32":
13
}
, "PendingOp": { "int32":
0
}
 }
, { "DataverseName"
*...*
*...*
*...]*

*With asynchronous query, handle key as expected.*
$ curl -i -X GET '
http://localhost:19002/query?query=for+%24ds+in+dataset+Metadata.Dataset+return+%24ds%3B&mode=asynchronous'
-H "Accept: application/json"

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Server: Jetty(8.0.0.RC0)

{"handle":[38,0]}

*With erroneous query, error-code key as expected.*
$ curl -i -X GET '
http://localhost:19002/query?query=for+%24ds+in+dataset+Metadata.Dataset+return+%24error%3B'
-H "Accept: application/json"

HTTP/1.1 500 Server Error
Content-Type: application/json;charset=utf-8
Content-Length: 62
Server: Jetty(8.0.0.RC0)

{"error-code":[2,"SyntaxError: can't find variable $error\n"]}

Mime
View raw message