Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Yingyi Bu (Code Review)
Yingyi Bu has submitted this change and it was merged.

Change subject: Adds a function: object_pairs.
..


Adds a function: object_pairs.

Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1288
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Till Westmann 
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.2.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.3.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs/object_pairs.1.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/records/object_pairs-2/object_pairs-2.1.adm
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/records/object_pairs/object_pairs.1.adm
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
A 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordPairsDescriptor.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
14 files changed, 356 insertions(+), 5 deletions(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; Verified

Objections:
  Jenkins: Violations found



diff --git 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
index dd45c86..fc49503 100644
--- 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
+++ 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
@@ -259,6 +259,7 @@
 import 
org.apache.asterix.runtime.evaluators.functions.records.GetRecordFieldsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.records.RecordAddFieldsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.records.RecordMergeDescriptor;
+import 
org.apache.asterix.runtime.evaluators.functions.records.RecordPairsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.records.RecordRemoveFieldsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.temporal.AdjustDateTimeForTimeZoneDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.temporal.AdjustTimeForTimeZoneDescriptor;
@@ -681,6 +682,9 @@
 // Cast function
 functionsToInjectUnkownHandling.add(CastTypeDescriptor.FACTORY);
 
+// Record function
+functionsToInjectUnkownHandling.add(RecordPairsDescriptor.FACTORY);
+
 List generatedFactories = new 
ArrayList<>();
 for (IFunctionDescriptorFactory factory : 
functionsToInjectUnkownHandling) {
 generatedFactories
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
index 7c2b0a4..10a8702 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
@@ -103,6 +103,16 @@
 
   
   
+
+  object_pairs
+
+  
+  
+
+  object_pairs-2
+
+  
+  
 
   open-record-constructor_01
 
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
new file mode 100644
index 000..96752bf
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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 fi

Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Till Westmann (Code Review)
Till Westmann has posted comments on this change.

Change subject: Adds a function: object_pairs.
..


Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Adds a function: object_pairs.
..


Patch Set 2: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/932/ : 
SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Adds a function: object_pairs.
..


Patch Set 2:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/932/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Adds a function: object_pairs.
..


Patch Set 2:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3022/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Yingyi Bu (Code Review)
Yingyi Bu has uploaded a new patch set (#2).

Change subject: Adds a function: object_pairs.
..

Adds a function: object_pairs.

Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.2.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.3.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs/object_pairs.1.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/records/object_pairs-2/object_pairs-2.1.adm
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/records/object_pairs/object_pairs.1.adm
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
A 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordPairsDescriptor.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
14 files changed, 356 insertions(+), 5 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/88/1288/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1288
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Adds a function: object_pairs.
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3021/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Adds a function: object_pairs.

2016-10-14 Thread Yingyi Bu (Code Review)
Yingyi Bu has uploaded a new change for review.

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

Change subject: Adds a function: object_pairs.
..

Adds a function: object_pairs.

Change-Id: If57d83c88a813f19c3e64f9eec973b691c84d39b
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.2.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.3.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs/object_pairs.1.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/records/object_pairs-2/object_pairs-2.1.adm
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/records/object_pairs/object_pairs.1.adm
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordPairsTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AOrderedListType.java
A 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordPairsDescriptor.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
14 files changed, 357 insertions(+), 5 deletions(-)


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

diff --git 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
index dd45c86..fc49503 100644
--- 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
+++ 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
@@ -259,6 +259,7 @@
 import 
org.apache.asterix.runtime.evaluators.functions.records.GetRecordFieldsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.records.RecordAddFieldsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.records.RecordMergeDescriptor;
+import 
org.apache.asterix.runtime.evaluators.functions.records.RecordPairsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.records.RecordRemoveFieldsDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.temporal.AdjustDateTimeForTimeZoneDescriptor;
 import 
org.apache.asterix.runtime.evaluators.functions.temporal.AdjustTimeForTimeZoneDescriptor;
@@ -681,6 +682,9 @@
 // Cast function
 functionsToInjectUnkownHandling.add(CastTypeDescriptor.FACTORY);
 
+// Record function
+functionsToInjectUnkownHandling.add(RecordPairsDescriptor.FACTORY);
+
 List generatedFactories = new 
ArrayList<>();
 for (IFunctionDescriptorFactory factory : 
functionsToInjectUnkownHandling) {
 generatedFactories
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
index 7c2b0a4..10a8702 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/RecordsQueries.xml
@@ -103,6 +103,16 @@
 
   
   
+
+  object_pairs
+
+  
+  
+
+  object_pairs-2
+
+  
+  
 
   open-record-constructor_01
 
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
new file mode 100644
index 000..96752bf
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/records/object_pairs-2/object_pairs.1.ddl.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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