You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2018/04/03 08:08:38 UTC
[02/12] asterixdb git commit: [ASTERIXDB-2345][FUN] Fix runtime output type for object_names()
[ASTERIXDB-2345][FUN] Fix runtime output type for object_names()
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- object_names() should produce ordered_list<string> instead of ordered_list<any>
Change-Id: I5181680bfe978d4208141a30b2167f78368bcf8d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2540
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/6ee96a9d
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/6ee96a9d
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/6ee96a9d
Branch: refs/heads/master
Commit: 6ee96a9d321ea85b76077796c481d8662e3c3d0c
Parents: bf41e4c
Author: Dmitry Lychagin <dm...@couchbase.com>
Authored: Wed Mar 28 14:36:52 2018 -0700
Committer: Dmitry Lychagin <dm...@couchbase.com>
Committed: Wed Mar 28 18:25:38 2018 -0700
----------------------------------------------------------------------
.../evaluators/functions/records/RecordNamesDescriptor.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/6ee96a9d/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordNamesDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordNamesDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordNamesDescriptor.java
index bb8e3e7..1719980 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordNamesDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordNamesDescriptor.java
@@ -31,6 +31,7 @@ import org.apache.asterix.om.pointables.nonvisitor.ARecordPointable;
import org.apache.asterix.om.types.AOrderedListType;
import org.apache.asterix.om.types.ARecordType;
import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
import org.apache.asterix.runtime.evaluators.functions.PointableHelper;
import org.apache.asterix.runtime.functions.FunctionTypeInferers;
@@ -78,6 +79,7 @@ public class RecordNamesDescriptor extends AbstractScalarFunctionDynamicDescript
private final IPointable argPtr = new VoidPointable();
private final ARecordPointable recordPointable =
(ARecordPointable) ARecordPointable.FACTORY.createPointable();
+ private final AOrderedListType listType = new AOrderedListType(BuiltinType.ASTRING, null);
private final OrderedListBuilder listBuilder = new OrderedListBuilder();
private final ArrayBackedValueStorage itemStorage = new ArrayBackedValueStorage();
private final DataOutput itemOut = itemStorage.getDataOutput();
@@ -100,7 +102,7 @@ public class RecordNamesDescriptor extends AbstractScalarFunctionDynamicDescript
recordPointable.set(data, offset, argPtr.getLength());
- listBuilder.reset(AOrderedListType.FULL_OPEN_ORDEREDLIST_TYPE);
+ listBuilder.reset(listType);
try {
for (int i = 0, n = recordPointable.getSchemeFieldCount(recType); i < n; i++) {