@Override
  public void init(ByteArrayRef bytes, int start, int length) {
    String byteData = null;
    if (!LazyUtils.isNumberMaybe(bytes.getData(), start, length)) {
      isNull = true;
      return;
    }
    try {
      byteData = Text.decode(bytes.getData(), start, length);
      data.set(Float.parseFloat(byteData));
      isNull = false;
    } catch (NumberFormatException e) {
      isNull = true;
      LOG.debug("Data not in the Float data type range so converted to null. Given data is :"
          + byteData, e);
    } catch (CharacterCodingException e) {
      isNull = true;
      LOG.debug("Data not in the Float data type range so converted to null.", e);
    }
  }
LazyObject for storing a value of Double.
serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFloat.java