Murtadha Hubail has uploaded a new change for review.

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

Change subject: [NO ISSUE][FAIL] Move Error Code To AsterixDB
......................................................................

[NO ISSUE][FAIL] Move Error Code To AsterixDB

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Move error CANNOT_COMPARE_COMPLEX to its
  proper place from Hyracks to AsterixDB.

Change-Id: I94408b687081af9bfe9efccefc123173ba4e7922
---
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArraySearchEval.java
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
5 files changed, 5 insertions(+), 4 deletions(-)


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

diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
index e0c0d78..81ec09a 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
@@ -76,6 +76,7 @@
     public static final int REJECT_NODE_UNREGISTERED = 33;
     public static final int DIVISION_BY_ZERO = 34;
     public static final int UNSUPPORTED_MULTIPLE_STATEMENTS = 35;
+    public static final int CANNOT_COMPARE_COMPLEX = 36;
 
     public static final int UNSUPPORTED_JRE = 100;
 
diff --git 
a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties 
b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
index d600762..603a252 100644
--- a/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
+++ b/asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
@@ -69,6 +69,7 @@
 33 = Node is not registered with the CC
 34 = Division by Zero.
 35 = Unsupported multiple statements.
+36 = Cannot compare non-primitive values
 
 100 = Unsupported JRE: %1$s
 
diff --git 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArraySearchEval.java
 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArraySearchEval.java
index e3490db..6677a1f 100755
--- 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArraySearchEval.java
+++ 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArraySearchEval.java
@@ -22,6 +22,8 @@
 
 import java.io.IOException;
 
+import org.apache.asterix.common.exceptions.ErrorCode;
+import org.apache.asterix.common.exceptions.RuntimeDataException;
 import 
org.apache.asterix.dataflow.data.nontagged.comparators.AObjectAscBinaryComparatorFactory;
 import org.apache.asterix.om.base.AMutableInt32;
 import org.apache.asterix.runtime.evaluators.common.ListAccessor;
@@ -29,7 +31,6 @@
 import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
 import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
-import org.apache.hyracks.api.exceptions.ErrorCode;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.api.exceptions.SourceLocation;
 import org.apache.hyracks.data.std.api.IPointable;
@@ -76,7 +77,7 @@
 
         // for now, we don't support deep equality of object/lists. Throw an 
error if the value is of these types
         if 
(ATYPETAGDESERIALIZER.deserialize(valueBytes[valueOffset]).isDerivedType()) {
-            throw 
HyracksDataException.create(ErrorCode.CANNOT_COMPARE_COMPLEX, sourceLocation);
+            throw new RuntimeDataException(ErrorCode.CANNOT_COMPARE_COMPLEX, 
sourceLocation);
         }
 
         if 
(!ATYPETAGDESERIALIZER.deserialize(listBytes[listOffset]).isListType()) {
diff --git 
a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
 
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
index 5f91e89..b6d7cc7 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
@@ -148,7 +148,6 @@
     public static final int CANNOT_ADD_ELEMENT_TO_INVERTED_INDEX_SEARCH_RESULT 
= 112;
     public static final int UNDEFINED_INVERTED_LIST_MERGE_TYPE = 113;
     public static final int NODE_IS_NOT_ACTIVE = 114;
-    public static final int CANNOT_COMPARE_COMPLEX = 115;
 
     // Compilation error codes.
     public static final int RULECOLLECTION_NOT_INSTANCE_OF_LIST = 10000;
diff --git 
a/hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
 
b/hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
index ea58c3c..ef07038 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
+++ 
b/hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
@@ -131,7 +131,6 @@
 112 = Cannot add an element to an inverted-index search result.
 113 = Undefined inverted-list merge type: %1$s
 114 = Node (%1$s) is not active
-115 = Cannot compare non-primitive values
 
 10000 = The given rule collection %1$s is not an instance of the List class.
 10001 = Cannot compose partition constraint %1$s with %2$s

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94408b687081af9bfe9efccefc123173ba4e7922
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <[email protected]>

Reply via email to