Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

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

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


ASTERIXDB-1631: let TypeComputeUtils handle input type ANY properly.

Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1191
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Till Westmann 
---
M asterixdb/asterix-om/pom.xml
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
D 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
R 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotUnknownTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NullableDoubleTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
A 
asterixdb/asterix-om/src/test/java/org/apache/asterix/om/typecomputer/TypeComputerTest.java
9 files changed, 158 insertions(+), 91 deletions(-)

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



diff --git a/asterixdb/asterix-om/pom.xml b/asterixdb/asterix-om/pom.xml
index 60fa26c..72bf65e 100644
--- a/asterixdb/asterix-om/pom.xml
+++ b/asterixdb/asterix-om/pom.xml
@@ -74,5 +74,11 @@
   junit
   test
 
+
+  org.mockito
+  mockito-all
+  1.10.19
+  test
+
   
 
diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
index 184dd84..a85d33b 100644
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
+++ 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
@@ -68,7 +68,7 @@
 import org.apache.asterix.om.typecomputer.impl.LocalAvgTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.MinMaxAggTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.NonTaggedGetItemResultType;
-import org.apache.asterix.om.typecomputer.impl.NotMissingTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.NotUnknownTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.NullableDoubleTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.NumericAddSubMulDivTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.NumericAggTypeComputer;
@@ -810,7 +810,7 @@
 addFunction(DEEP_EQUAL, BooleanFunctionTypeComputer.INSTANCE, true);
 
 // and then, Asterix builtin functions
-addPrivateFunction(CHECK_UNKNOWN, NotMissingTypeComputer.INSTANCE, 
true);
+addPrivateFunction(CHECK_UNKNOWN, NotUnknownTypeComputer.INSTANCE, 
true);
 addPrivateFunction(ANY_COLLECTION_MEMBER, 
CollectionMemberResultType.INSTANCE, true);
 addFunction(BOOLEAN_CONSTRUCTOR, StringBooleanTypeComputer.INSTANCE, 
true);
 addFunction(CARET, NumericAddSubMulDivTypeComputer.INSTANCE, true);
diff --git 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
 
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
deleted file mode 100644
index 27e8a3d..000
--- 
a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.asterix.om.typecomputer.impl;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import 

Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

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

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


Patch Set 4: Integration-Tests+1

Integration Tests Successful

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


Patch Set 4:

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


Patch Set 4:

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Yingyi Bu (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#4).

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..

ASTERIXDB-1631: let TypeComputeUtils handle input type ANY properly.

Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
---
M asterixdb/asterix-om/pom.xml
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
D 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
R 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotUnknownTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NullableDoubleTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
A 
asterixdb/asterix-om/src/test/java/org/apache/asterix/om/typecomputer/TypeComputerTest.java
9 files changed, 158 insertions(+), 91 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/91/1191/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1191
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


Patch Set 3:

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: No


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Yingyi Bu (Code Review)
Yingyi Bu has posted comments on this change.

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..


Patch Set 2:

(3 comments)

https://asterix-gerrit.ics.uci.edu/#/c/1191/2//COMMIT_MSG
Commit Message:

Line 7: ASTERIXDB-1631: let TypeComputeUitls handle input type ANY properly.
> s/TypeComputeUitls/TypeComputeUtils/
Done


https://asterix-gerrit.ics.uci.edu/#/c/1191/2/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
File 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java:

Line 127: } else if (inputTypeTag == ATypeTag.ANY) {
> Could we switch on inputType.getTypeTag()?
Done


https://asterix-gerrit.ics.uci.edu/#/c/1191/2/asterixdb/asterix-om/src/test/java/org/apache/asterix/om/typecomputer/TypeComputerTest.java
File 
asterixdb/asterix-om/src/test/java/org/apache/asterix/om/typecomputer/TypeComputerTest.java:

Line 105: IAType resultType = instance.computeType(mockExpr, 
mockTypeEnv, mockMetadataProvider);
> Running through the tests a saw a few result types, that were UNION types w
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-Reviewer: abdullah alamoudi 
Gerrit-HasComments: Yes


Change in asterixdb[master]: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY p...

2016-09-20 Thread Yingyi Bu (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#3).

Change subject: ASTERIXDB-1631: let TypeComputeUtils handle input type ANY 
properly.
..

ASTERIXDB-1631: let TypeComputeUtils handle input type ANY properly.

Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
---
M asterixdb/asterix-om/pom.xml
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
D 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/FlowRecordResultTypeComputer.java
R 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NotUnknownTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/NullableDoubleTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordAddFieldsTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/SubsetCollectionTypeComputer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
A 
asterixdb/asterix-om/src/test/java/org/apache/asterix/om/typecomputer/TypeComputerTest.java
9 files changed, 155 insertions(+), 91 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/91/1191/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1191
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie6b3f0e9d9b4ddd9280e06f72a5ca30aa776315d
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: abdullah alamoudi