if (valueArg instanceof DoubleExpression && isEqualityFn) { bb = newByteBuf(8, true); bb.writeDouble(((DoubleExpression) valueArg).getDouble()); if (encodingType.endsWith("_OBD")) { org.apache.hadoop.hbase.util.OrderedBytes.encodeFloat64(br, ((DoubleExpression) valueArg).getDouble(), Order.DESCENDING); this.sortOrderAscending = false; } else { org.apache.hadoop.hbase.util.OrderedBytes.encodeFloat64(br, ((DoubleExpression) valueArg).getDouble(), Order.ASCENDING);
public static LogicalExpression getNumericExpression(String sign, String s, ExpressionPosition ep) { String numStr = (sign == null) ? s : sign+s; try { int a = Integer.parseInt(numStr); return new IntExpression(a, ep); } catch (Exception e) { } try { long l = Long.parseLong(numStr); return new LongExpression(l, ep); } catch (Exception e) { } try { double d = Double.parseDouble(numStr); return new DoubleExpression(d, ep); } catch (Exception e) { } throw new IllegalArgumentException(String.format("Unable to parse string %s as integer or floating point number.", numStr)); }
if (valueArg instanceof DoubleExpression && isEqualityFn) { bb = newByteBuf(8, true); bb.writeDouble(((DoubleExpression) valueArg).getDouble()); if (encodingType.endsWith("_OBD")) { org.apache.hadoop.hbase.util.OrderedBytes.encodeFloat64(br, ((DoubleExpression) valueArg).getDouble(), Order.DESCENDING); this.sortOrderAscending = false; } else { org.apache.hadoop.hbase.util.OrderedBytes.encodeFloat64(br, ((DoubleExpression) valueArg).getDouble(), Order.ASCENDING);
this.value = KeyValueBuilder.initFrom(((DoubleExpression)valueArg).getDouble()); this.path = path; return true;
public static LogicalExpression getNumericExpression(String sign, String s, ExpressionPosition ep) { String numStr = (sign == null) ? s : sign+s; try { int a = Integer.parseInt(numStr); return new IntExpression(a, ep); } catch (Exception e) { } try { long l = Long.parseLong(numStr); return new LongExpression(l, ep); } catch (Exception e) { } try { double d = Double.parseDouble(numStr); return new DoubleExpression(d, ep); } catch (Exception e) { } throw new IllegalArgumentException(String.format("Unable to parse string %s as integer or floating point number.", numStr)); }
public static LogicalExpression getFloat8(double d){ return new DoubleExpression(d, ExpressionPosition.UNKNOWN); } public static LogicalExpression getFloat4(float f){
@Override public Statistics<T> visitDoubleConstant(ValueExpressions.DoubleExpression expr, Void value) throws RuntimeException { return getStatistics(expr.getDouble()); }
@Override public Void visitDoubleConstant(DoubleExpression dExpr, StringBuilder sb) throws RuntimeException { sb.append(dExpr.getDouble()); return null; }
@Override public ValueHolder visitDoubleConstant(ValueExpressions.DoubleExpression dExpr, Integer value) throws RuntimeException { return ValueHolderHelper.getFloat8Holder(dExpr.getDouble()); }
@Override public HoldingContainer visitDoubleConstant(DoubleExpression e, ClassGenerator<?> generator) throws RuntimeException { return getHoldingContainer( generator, e.getMajorType(), buffer -> ValueHolderHelper.getFloat8Holder(e.getDouble())); }
this.value = KeyValueBuilder.initFrom(((DoubleExpression)valueArg).getDouble()); this.path = path; return true;
@Override public Void visitDoubleConstant(DoubleExpression dExpr, StringBuilder sb) throws RuntimeException { sb.append(dExpr.getDouble()); return null; }
public static LogicalExpression getFloat8(double d){ return new DoubleExpression(d, ExpressionPosition.UNKNOWN); } public static LogicalExpression getFloat4(float f){