values.add(type.getDouble(block, position)); else if (REAL.equals(type)) { values.add(intBitsToFloat(toIntExact(type.getLong(block, position))));
private static boolean convertibleToDoubleWithCast(Type type) { return type instanceof DecimalType || DoubleType.DOUBLE.equals(type) || RealType.REAL.equals(type) || BigintType.BIGINT.equals(type) || IntegerType.INTEGER.equals(type) || SmallintType.SMALLINT.equals(type) || TinyintType.TINYINT.equals(type) || BooleanType.BOOLEAN.equals(type); } }
return ((Number) value).doubleValue(); else if (REAL.equals(type)) { return ((Number) value).floatValue();
statement.setDouble(parameter, type.getDouble(block, position)); else if (REAL.equals(type)) { statement.setFloat(parameter, intBitsToFloat(toIntExact(type.getLong(block, position))));
return ImmutableList.of(new OrcType(OrcTypeKind.DOUBLE)); if (REAL.equals(type)) { return ImmutableList.of(new OrcType(OrcTypeKind.FLOAT));
private static boolean isValidPartitionType(Type type) { return type instanceof DecimalType || BOOLEAN.equals(type) || TINYINT.equals(type) || SMALLINT.equals(type) || INTEGER.equals(type) || BIGINT.equals(type) || REAL.equals(type) || DOUBLE.equals(type) || DATE.equals(type) || TIMESTAMP.equals(type) || isVarcharType(type) || isCharType(type); }
format == DWRF); if (REAL.equals(type) || DOUBLE.equals(type)) { return new DoubleOrcPredicate( expectedValues.stream()
return (byte) type.getLong(block, position); if (RealType.REAL.equals(type)) { return intBitsToFloat((int) type.getLong(block, position));
return HIVE_BYTE.getTypeInfo(); if (REAL.equals(type)) { return HIVE_FLOAT.getTypeInfo();
return decimalEncoding(type); if (REAL.equals(type)) { return floatEncoding(type);
longs[columnIndex] = bigintPartitionKey(columnValue, name); else if (REAL.equals(type)) { longs[columnIndex] = floatPartitionKey(columnValue, name);
row.addLong(destChannel, type.getLong(block, position) * 1000); else if (REAL.equals(type)) { row.addFloat(destChannel, intBitsToFloat((int) type.getLong(block, position)));
@Override protected String toSqlType(Type type) if (REAL.equals(type)) { return "float";
cursor.getDouble(columnIndex); else if (REAL.equals(type)) { cursor.getLong(columnIndex);
type.writeLong(blockBuilder, ((SqlDecimal) element).getUnscaledValue().longValue()); else if (REAL.equals(type)) { type.writeLong(blockBuilder, floatToRawIntBits(((Number) element).floatValue()));
return createDomain(type, hasNullValue, columnStatistics.getDoubleStatistics()); else if (REAL.equals(type) && columnStatistics.getDoubleStatistics() != null) { return createDomain(type, hasNullValue, columnStatistics.getDoubleStatistics(), value -> (long) floatToRawIntBits(value.floatValue()));
type.writeDouble(blockBuilder, ((Number) value).doubleValue()); else if (REAL.equals(type)) { float floatValue = ((Number) value).floatValue(); type.writeLong(blockBuilder, Float.floatToIntBits(floatValue));
parseLongColumn(column); else if (REAL.equals(type)) { parseLongColumn(column);
return cursor.getLong(field); else if (REAL.equals(type)) { return intBitsToFloat((int) cursor.getLong(field));
assertInstanceOf(value, Double.class); else if (REAL.equals(column.getType())) { assertInstanceOf(value, Float.class);