Package org.apache.flink.types

Examples of org.apache.flink.types.FloatValue


  }
 
  @Override
  public FloatValue[] getValidTestResults() {
    return new FloatValue[] {
      new FloatValue(0f), new FloatValue(0.0f), new FloatValue(123.4f),
      new FloatValue(0.124f), new FloatValue(.623f), new FloatValue(1234f), new FloatValue(-12.34f),
      new FloatValue(Float.MAX_VALUE), new FloatValue(Float.MIN_VALUE),
      new FloatValue(Float.NEGATIVE_INFINITY), new FloatValue(Float.POSITIVE_INFINITY),
      new FloatValue(Float.NaN),
      new FloatValue(1.234E2f), new FloatValue(1.234e3f), new FloatValue(1.234E-2f)
    };
  }
View Full Code Here


    }
    if(hadoopType instanceof org.apache.hadoop.io.IntWritable) {
      return new IntValue(((IntWritable)hadoopType).get());
    }
    if(hadoopType instanceof org.apache.hadoop.io.FloatWritable) {
      return new FloatValue(((FloatWritable)hadoopType).get());
    }
    if(hadoopType instanceof org.apache.hadoop.io.DoubleWritable) {
      return new DoubleValue(((DoubleWritable)hadoopType).get());
    }
    if(hadoopType instanceof org.apache.hadoop.io.BooleanWritable) {
View Full Code Here

      break;
    case java.sql.Types.FLOAT:
      record.setField(pos, new DoubleValue(resultSet.getDouble(pos + 1)));
      break;
    case java.sql.Types.REAL:
      record.setField(pos, new FloatValue(resultSet.getFloat(pos + 1)));
      break;
    case java.sql.Types.DOUBLE:
      record.setField(pos, new DoubleValue(resultSet.getDouble(pos + 1)));
      break;
    case java.sql.Types.DECIMAL:
View Full Code Here

    return false;
  }
 
  @Override
  public FloatValue createInstance() {
    return new FloatValue();
  }
View Full Code Here

    return new FloatValue();
  }

  @Override
  public FloatValue copy(FloatValue from) {
    return copy(from, new FloatValue());
  }
View Full Code Here

    record.write(target);
  }

  @Override
  public FloatValue deserialize(DataInputView source) throws IOException {
    return deserialize(new FloatValue(), source);
  }
View Full Code Here

  @Override
  protected FloatValue[] getTestData() {
    Random rnd = new Random(874597969123412341L);
    float rndFloat = rnd.nextFloat() * Float.MAX_VALUE;
   
    return new FloatValue[] {new FloatValue(0), new FloatValue(1), new FloatValue(-1),
              new FloatValue(Float.MAX_VALUE), new FloatValue(Float.MIN_VALUE),
              new FloatValue(rndFloat), new FloatValue(-rndFloat),
              new FloatValue(Float.NaN),
              new FloatValue(Float.NEGATIVE_INFINITY), new FloatValue(Float.POSITIVE_INFINITY)};
  }
View Full Code Here

    }
  }
 
  @Override
  public FloatValue createValue() {
    return new FloatValue();
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.types.FloatValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.