diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/SimilarityCheckRule.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/SimilarityCheckRule.java
index e979b6c..5726ce3 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/SimilarityCheckRule.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/SimilarityCheckRule.java
@@ -7,8 +7,10 @@
 import org.apache.commons.lang3.mutable.MutableObject;
 
 import edu.uci.ics.asterix.aql.util.FunctionUtils;
+import edu.uci.ics.asterix.om.base.ADouble;
 import edu.uci.ics.asterix.om.base.AFloat;
 import edu.uci.ics.asterix.om.base.AInt32;
+import edu.uci.ics.asterix.om.base.IAObject;
 import edu.uci.ics.asterix.om.constants.AsterixConstantValue;
 import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -216,12 +218,21 @@
         ScalarFunctionCallExpression simCheckFuncExpr = null; 
         // Look for jaccard function call, and GE or GT.
         if (funcExpr.getFunctionIdentifier() == AsterixBuiltinFunctions.SIMILARITY_JACCARD) {
-            AFloat aFloat = (AFloat) constVal.getObject();
-            AFloat jaccThresh;
-            if (normFuncIdent == AlgebricksBuiltinFunctions.GE) {
-                jaccThresh = aFloat;
+            IAObject jaccThresh;
+            if (normFuncIdent == AlgebricksBuiltinFunctions.GE) {                
+                if (constVal.getObject() instanceof AFloat) {
+                    jaccThresh = constVal.getObject();                    
+                } else {
+                    jaccThresh = new AFloat((float)((ADouble) constVal.getObject()).getDoubleValue());
+                }
             } else if (normFuncIdent == AlgebricksBuiltinFunctions.GT) {
-                float f = aFloat.getFloatValue() + Float.MIN_VALUE;
+                float threshVal = 0.0f;            
+                if (constVal.getObject() instanceof AFloat) {
+                    threshVal = ((AFloat) constVal.getObject()).getFloatValue();
+                } else {
+                    threshVal = (float)((ADouble) constVal.getObject()).getDoubleValue();                    
+                }
+                float f = threshVal + Float.MIN_VALUE;
                 if (f > 1.0f) f = 1.0f;
                 jaccThresh = new AFloat(f);
             } else {
