Dmitry Lychagin has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2540

Change subject: [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
---
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordNamesDescriptor.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/40/2540/1

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.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 @@
                     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 @@
 
                         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++) {

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2540
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5181680bfe978d4208141a30b2167f78368bcf8d
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: release-0.9.4-pre-rc
Gerrit-Owner: Dmitry Lychagin <[email protected]>

Reply via email to