This is an automated email from the ASF dual-hosted git repository. dlych pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit f4ae454e111e7d8b552c63116a6545ca1b5aba98 Author: Ali Alsuliman <ali.al.solai...@gmail.com> AuthorDate: Thu Dec 10 11:59:02 2020 -0800 [ASTERIXDB-2817][FUN] Fix IndexOutOfBoundsException in get_object_fields() - user model changes: no - storage format changes: no - interface changes: no Details: - Fix IndexOutOfBoundsException in get_object_fields() - Add test case - Enable some test case Change-Id: I8966a8a66ba8b0e50ad34cbec40a511769dc801d Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/9283 Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Ali Alsuliman <ali.al.solai...@gmail.com> Reviewed-by: Dmitry Lychagin <dmitry.lycha...@couchbase.com> --- .../queries_sqlpp/objects/ObjectsQueries.xml | 9 ++++-- .../missing-fields/missing-fields.1.ddl.sqlpp | 37 ++++++++++++++++++++++ .../missing-fields/missing-fields.2.update.sqlpp | 26 +++++++++++++++ .../missing-fields/missing-fields.3.query.sqlpp | 24 ++++++++++++++ .../missing-fields/missing-fields.4.query.sqlpp | 23 ++++++++++++++ .../missing-fields/missing-fields.3.adm | 3 ++ .../missing-fields/missing-fields.4.adm | 14 ++++++++ .../tiny-social-example/tiny-social-example.4.adm | 2 +- .../tiny-social-example/tiny-social-example.5.adm | 20 ++++++------ .../tiny-social-example/tiny-social-example.6.adm | 30 +++++++++--------- .../tiny-social-example/tiny-social-example.7.adm | 8 ++--- .../tiny-social-example/tiny-social-example.8.adm | 24 +++++++------- .../tiny-social-example/tiny-social-example.9.adm | 12 +++---- .../om/pointables/nonvisitor/ARecordPointable.java | 2 +- .../functions/records/RecordFieldsUtil.java | 34 ++++++++++---------- 15 files changed, 199 insertions(+), 69 deletions(-) diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml index d8a13414..bb51b39 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml @@ -57,11 +57,11 @@ <output-dir compare="Text">documentation-example</output-dir> </compilation-unit> </test-case> - <!--test-case FilePath="objects/get-object-fields"> + <test-case FilePath="objects/get-object-fields"> <compilation-unit name="tiny-social-example"> <output-dir compare="Text">tiny-social-example</output-dir> </compilation-unit> - </test-case!--> + </test-case> <test-case FilePath="objects/get-object-fields"> <compilation-unit name="tiny-social-example-no-complex-types"> <output-dir compare="Text">tiny-social-example-no-complex-types</output-dir> @@ -77,6 +77,11 @@ <output-dir compare="Text">tiny-social-example-only-records</output-dir> </compilation-unit> </test-case> + <test-case FilePath="objects/get-object-fields"> + <compilation-unit name="missing-fields"> + <output-dir compare="Text">missing-fields</output-dir> + </compilation-unit> + </test-case> <test-case FilePath="objects/get-object-field-value"> <compilation-unit name="documentation-example"> <output-dir compare="Text">documentation-example</output-dir> diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.1.ddl.sqlpp new file mode 100644 index 0000000..4eeae30 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.1.ddl.sqlpp @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Testing get-object-fields where some schema (complex) fields are missing or null + */ + +DROP DATAVERSE test IF EXISTS; +CREATE DATAVERSE test; + +USE test; + +CREATE TYPE t1 AS { + inner_f: string +}; + +CREATE TYPE t2 AS { + id: int, + f: t1? +}; + +CREATE DATASET ds1(t2) PRIMARY KEY id; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.2.update.sqlpp new file mode 100644 index 0000000..93573bb --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.2.update.sqlpp @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +USE test; + +INSERT INTO ds1([ +{"id": 1, "f": null }, +{"id": 2}, +{"id": 3, "f": {"inner_f": "foo", "inner_f2": {"f3": "bar"} } } +]); \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.3.query.sqlpp new file mode 100644 index 0000000..819f46a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.3.query.sqlpp @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +USE test; + +FROM ds1 AS t +SELECT VALUE get_object_fields(t) +ORDER BY t.id; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.4.query.sqlpp new file mode 100644 index 0000000..d56e1e1 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/get-object-fields/missing-fields/missing-fields.4.query.sqlpp @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +FROM `Metadata`.`Dataset` d, get_object_fields(d) f +WHERE f.`is-open` = false +SELECT DISTINCT VALUE f.`field-name` +ORDER BY f.`field-name`; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/missing-fields/missing-fields.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/missing-fields/missing-fields.3.adm new file mode 100644 index 0000000..ea6f909 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/missing-fields/missing-fields.3.adm @@ -0,0 +1,3 @@ +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "f", "field-type": "object", "is-open": false } ] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "f", "field-type": "object", "is-open": false } ] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "f", "field-type": "object", "is-open": false, "nested": [ { "field-name": "inner_f", "field-type": "string", "is-open": false }, { "field-name": "inner_f2", "field-type": "object", "is-open": true, "nested": [ { "field-name": "f3", "field-type": "string", "is-open": true } ] } ] } ] \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/missing-fields/missing-fields.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/missing-fields/missing-fields.4.adm new file mode 100644 index 0000000..0b364b1 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/missing-fields/missing-fields.4.adm @@ -0,0 +1,14 @@ +"CompactionPolicy" +"CompactionPolicyProperties" +"DatasetId" +"DatasetName" +"DatasetType" +"DatatypeDataverseName" +"DatatypeName" +"DataverseName" +"ExternalDetails" +"GroupName" +"Hints" +"InternalDetails" +"PendingOp" +"Timestamp" \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.4.adm index 2938d8c..79f0217 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.4.adm +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.4.adm @@ -1 +1 @@ -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" } ] }, { "field-name": "employment", "field-type": "ORDEREDLIST", "is-open": false, "list": [ { "fi [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" } ] }, { "field-name": "employment", "field-type": "array", "is-open": false, "list": [ { "field-type" [...] diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.5.adm index 74d2d3f..f8e1f55 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.5.adm +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.5.adm @@ -1,10 +1,10 @@ -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-na [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-name": "employment", "field-type": "ORDEREDLIST", "is-op [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-na [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" } ] }, { "field-name": "employment", "field-type": "ORDEREDLIST", "is-open": false, "list": [ { "fi [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-name": "employment", "field-t [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-name": "employment", "field-t [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" } ] }, { "field-name": "employment", "field-type": "ORDEREDLIST", "is-open": false, "list": [ { "fi [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" } ] }, { "field-name": "employment", "field-type": "ORDEREDLIST", "is-open": false, "list": [ { "fi [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-name": "employment", "field-type": "ORDEREDLIST", "is-op [...] -[ { "field-name": "id", "field-type": "INT64", "is-open": false }, { "field-name": "alias", "field-type": "STRING", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": false }, { "field-name": "user-since", "field-type": "DATETIME", "is-open": false }, { "field-name": "friend-ids", "field-type": "UNORDEREDLIST", "is-open": false, "list": [ { "field-type": "INT64" }, { "field-type": "INT64" }, { "field-type": "INT64" } ] }, { "field-name": "employment", "field-t [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-na [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-name": "employment", "field-type": "array", "is-open": fal [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-na [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" } ] }, { "field-name": "employment", "field-type": "array", "is-open": false, "list": [ { "field-type" [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-name": "employment", "field-ty [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-name": "employment", "field-ty [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" } ] }, { "field-name": "employment", "field-type": "array", "is-open": false, "list": [ { "field-type" [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" } ] }, { "field-name": "employment", "field-type": "array", "is-open": false, "list": [ { "field-type" [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-name": "employment", "field-type": "array", "is-open": fal [...] +[ { "field-name": "id", "field-type": "bigint", "is-open": false }, { "field-name": "alias", "field-type": "string", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": false }, { "field-name": "user-since", "field-type": "datetime", "is-open": false }, { "field-name": "friend-ids", "field-type": "multiset", "is-open": false, "list": [ { "field-type": "bigint" }, { "field-type": "bigint" }, { "field-type": "bigint" } ] }, { "field-name": "employment", "field-ty [...] \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.6.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.6.adm index 73bfe63..9a60421 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.6.adm +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.6.adm @@ -1,15 +1,15 @@ -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] -[ { "field-name": "message-id", "field-type": "INT64", "is-open": false }, { "field-name": "author-id", "field-type": "INT64", "is-open": false }, { "field-name": "in-response-to", "field-type": "INT64", "is-open": false }, { "field-name": "sender-location", "field-type": "POINT", "is-open": false }, { "field-name": "message", "field-type": "STRING", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] +[ { "field-name": "message-id", "field-type": "bigint", "is-open": false }, { "field-name": "author-id", "field-type": "bigint", "is-open": false }, { "field-name": "in-response-to", "field-type": "bigint", "is-open": false }, { "field-name": "sender-location", "field-type": "point", "is-open": false }, { "field-name": "message", "field-type": "string", "is-open": false } ] \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.7.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.7.adm index 429d522..d63f06f 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.7.adm +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.7.adm @@ -1,4 +1,4 @@ -[ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": true }, { "field-name": "followers_count", "field-type": "INT64", "is-open": true } ] -[ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": true }, { "field-name": "followers_count", "field-type": "INT64", "is-open": true } ] -[ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": true }, { "field-name": "followers_count", "field-type": "INT64", "is-open": true } ] -[ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING", "is-open": true }, { "field-name": "followers_count", "field-type": "INT64", "is-open": true } ] +[ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": true }, { "field-name": "followers_count", "field-type": "bigint", "is-open": true } ] +[ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": true }, { "field-name": "followers_count", "field-type": "bigint", "is-open": true } ] +[ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": true }, { "field-name": "followers_count", "field-type": "bigint", "is-open": true } ] +[ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "string", "is-open": true }, { "field-name": "followers_count", "field-type": "bigint", "is-open": true } ] \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.8.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.8.adm index c31a69b..e84c545 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.8.adm +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.8.adm @@ -1,12 +1,12 @@ -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] -[ { "field-name": "tweetid", "field-type": "STRING", "is-open": false }, { "field-name": "user", "field-type": "RECORD", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "STRING", "is-open": false }, { "field-name": "lang", "field-type": "STRING", "is-open": false }, { "field-name": "friends_count", "field-type": "INT64", "is-open": false }, { "field-name": "statuses_count", "field-type": "INT64", "is-open": false }, { "field-name": "name", "field-type": "STRING [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] +[ { "field-name": "tweetid", "field-type": "string", "is-open": false }, { "field-name": "user", "field-type": "object", "is-open": false, "nested": [ { "field-name": "screen-name", "field-type": "string", "is-open": false }, { "field-name": "lang", "field-type": "string", "is-open": false }, { "field-name": "friends_count", "field-type": "bigint", "is-open": false }, { "field-name": "statuses_count", "field-type": "bigint", "is-open": false }, { "field-name": "name", "field-type": "stri [...] \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.9.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.9.adm index 8693920..967135f 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.9.adm +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/get-object-fields/tiny-social-example/tiny-social-example.9.adm @@ -1,6 +1,6 @@ -{ "count": 12, "field-name": "message-text", "field-type": "STRING" } -{ "count": 12, "field-name": "referred-topics", "field-type": "UNORDEREDLIST" } -{ "count": 12, "field-name": "send-time", "field-type": "DATETIME" } -{ "count": 12, "field-name": "sender-location", "field-type": "POINT" } -{ "count": 12, "field-name": "tweetid", "field-type": "STRING" } -{ "count": 12, "field-name": "user", "field-type": "RECORD" } +{ "count": 12, "field-name": "message-text", "field-type": "string" } +{ "count": 12, "field-name": "referred-topics", "field-type": "multiset" } +{ "count": 12, "field-name": "send-time", "field-type": "datetime" } +{ "count": 12, "field-name": "sender-location", "field-type": "point" } +{ "count": 12, "field-name": "tweetid", "field-type": "string" } +{ "count": 12, "field-name": "user", "field-type": "object" } \ No newline at end of file diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java index af8d5e6..cc3816c 100644 --- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java +++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/ARecordPointable.java @@ -152,7 +152,7 @@ public class ARecordPointable extends AbstractPointable { && RecordUtil.isNull(bytes[getNullBitmapOffset(recordType) + fieldId / 4], fieldId); } - private boolean isClosedFieldMissing(ARecordType recordType, int fieldId) { + public boolean isClosedFieldMissing(ARecordType recordType, int fieldId) { return getNullBitmapSize(recordType) > 0 && RecordUtil.isMissing(bytes[getNullBitmapOffset(recordType) + fieldId / 4], fieldId); } diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java index 0d85807..25dd73e 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordFieldsUtil.java @@ -58,16 +58,15 @@ public class RecordFieldsUtil { private final static AString nestedName = new AString("nested"); private final static AString listName = new AString("list"); - private IObjectPool<IARecordBuilder, ATypeTag> recordBuilderPool = - new ListObjectPool<IARecordBuilder, ATypeTag>(new RecordBuilderFactory()); - private IObjectPool<IAsterixListBuilder, ATypeTag> listBuilderPool = - new ListObjectPool<IAsterixListBuilder, ATypeTag>(new ListBuilderFactory()); - private IObjectPool<IMutableValueStorage, ATypeTag> abvsBuilderPool = - new ListObjectPool<IMutableValueStorage, ATypeTag>(new AbvsBuilderFactory()); - private IObjectPool<IPointable, ATypeTag> recordPointablePool = - new ListObjectPool<IPointable, ATypeTag>(ARecordPointable.ALLOCATOR); - private IObjectPool<IPointable, ATypeTag> listPointablePool = - new ListObjectPool<IPointable, ATypeTag>(AListPointable.ALLOCATOR); + private final IObjectPool<IARecordBuilder, ATypeTag> recordBuilderPool = + new ListObjectPool<>(new RecordBuilderFactory()); + private final IObjectPool<IAsterixListBuilder, ATypeTag> listBuilderPool = + new ListObjectPool<>(new ListBuilderFactory()); + private final IObjectPool<IMutableValueStorage, ATypeTag> abvsBuilderPool = + new ListObjectPool<>(new AbvsBuilderFactory()); + private final IObjectPool<IPointable, ATypeTag> recordPointablePool = + new ListObjectPool<>(ARecordPointable.ALLOCATOR); + private final IObjectPool<IPointable, ATypeTag> listPointablePool = new ListObjectPool<>(AListPointable.ALLOCATOR); private final static AOrderedListType listType = new AOrderedListType(BuiltinType.ANY, "fields"); //Better not be a static object. @@ -114,15 +113,14 @@ public class RecordFieldsUtil { // write nested or list types if (tag == ATypeTag.SERIALIZED_RECORD_TYPE_TAG || tag == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG || tag == ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG) { - if (!recordAccessor.isClosedFieldNull(recType, i)) { + if (!recordAccessor.isClosedFieldNull(recType, i) && !recordAccessor.isClosedFieldMissing(recType, i)) { IAType fieldType = recordAccessor.getClosedFieldType(recType, i); ArrayBackedValueStorage tmpValue = getTempBuffer(); tmpValue.reset(); recordAccessor.getClosedFieldValue(recType, i, tmpValue.getDataOutput()); if (tag == ATypeTag.SERIALIZED_RECORD_TYPE_TAG) { addNestedField(tmpValue, fieldType, fieldRecordBuilder, level + 1); - } else if (tag == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG - || tag == ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG) { + } else { addListField(tmpValue, fieldType, fieldRecordBuilder, level + 1); } } @@ -159,8 +157,7 @@ public class RecordFieldsUtil { recordAccessor.getOpenFieldValue(recType, i, tmpValue.getDataOutput()); if (tag == ATypeTag.SERIALIZED_RECORD_TYPE_TAG) { addNestedField(tmpValue, fieldType, fieldRecordBuilder, level + 1); - } else if (tag == ATypeTag.SERIALIZED_ORDEREDLIST_TYPE_TAG - || tag == ATypeTag.SERIALIZED_UNORDEREDLIST_TYPE_TAG) { + } else { addListField(tmpValue, fieldType, fieldRecordBuilder, level + 1); } } @@ -256,7 +253,7 @@ public class RecordFieldsUtil { ArrayBackedValueStorage itemValue = getTempBuffer(); IARecordBuilder listRecordBuilder = getRecordBuilder(); - AListPointable list = getListPointable(); + AListPointable list = getListPointable(fieldType.getTypeTag()); list.set(listArg); OrderedListBuilder innerListBuilder = getOrderedListBuilder(); @@ -274,6 +271,7 @@ public class RecordFieldsUtil { if (tagId == ATypeTag.SERIALIZED_RECORD_TYPE_TAG) { ArrayBackedValueStorage tmpAbvs = getTempBuffer(); + tmpAbvs.reset(); list.getItemValue(act, l, tmpAbvs.getDataOutput()); addNestedField(tmpAbvs, act.getItemType(), listRecordBuilder, level + 1); } @@ -288,8 +286,8 @@ public class RecordFieldsUtil { return (ARecordPointable) recordPointablePool.allocate(ATypeTag.OBJECT); } - private AListPointable getListPointable() { - return (AListPointable) listPointablePool.allocate(ATypeTag.ARRAY); + private AListPointable getListPointable(ATypeTag tag) { + return (AListPointable) listPointablePool.allocate(tag); } private IARecordBuilder getRecordBuilder() {