Package com.facebook.hive.orc.lazy

Examples of com.facebook.hive.orc.lazy.OrcLazyDouble.materialize()


    OrcLazyDouble double1 = (OrcLazyDouble) row.getFieldValue(12);
    if (double1.nextIsNull()) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(),
          ((DoubleWritable) double1.materialize()).get(), 0.0001);
    }

    if (((OrcLazyObject) row.getFieldValue(13)).nextIsNull()) {
      assertNull(expected.bytes1);
    } else {
View Full Code Here


    } else {
      assertEquals(expected.float1.floatValue(), float1.get(), 0.0001);
    }

    OrcLazyDouble lazyDouble1 = (OrcLazyDouble) row.getFieldValue(12);
    DoubleWritable double1 = (DoubleWritable) lazyDouble1.materialize();
    if (double1 == null) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(), double1.get(), 0.0001);
    }
View Full Code Here

        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.doubleTypeInfo);

    OrcLazyDouble lazyDouble2 = (OrcLazyDouble) doubleOI.copyObject(lazyDouble);

    Assert.assertEquals(1.0, ((DoubleWritable) lazyDouble.materialize()).get());
    Assert.assertEquals(1.0, ((DoubleWritable) lazyDouble2.materialize()).get());
  }

  /**
   * Tests that after copying a lazy float object, calling materialize on the original and the
   * copy doesn't advance the tree reader twice
View Full Code Here

    OrcLazyDouble double1 = (OrcLazyDouble) row.getFieldValue(12);
    if (double1.nextIsNull()) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(),
          ((DoubleWritable) double1.materialize()).get(), 0.0001);
    }

    if (((OrcLazyObject) row.getFieldValue(13)).nextIsNull()) {
      assertNull(expected.bytes1);
    } else {
View Full Code Here

    } else {
      assertEquals(expected.float1.floatValue(), float1.get(), 0.0001);
    }

    OrcLazyDouble lazyDouble1 = (OrcLazyDouble) row.getFieldValue(12);
    DoubleWritable double1 = (DoubleWritable) lazyDouble1.materialize();
    if (double1 == null) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(), double1.get(), 0.0001);
    }
View Full Code Here

        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.doubleTypeInfo);

    OrcLazyDouble lazyDouble2 = (OrcLazyDouble) doubleOI.copyObject(lazyDouble);

    Assert.assertEquals(1.0, ((DoubleWritable) lazyDouble.materialize()).get());
    Assert.assertEquals(1.0, ((DoubleWritable) lazyDouble2.materialize()).get());
  }

  /**
   * Tests that after copying a lazy float object, calling materialize on the original and the
   * copy doesn't advance the tree reader twice
View Full Code Here

    OrcLazyDouble double1 = (OrcLazyDouble) row.getFieldValue(12);
    if (double1.nextIsNull()) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(),
                   ((DoubleWritable) double1.materialize()).get(), 0.0001);
    }

    if (((OrcLazyObject) row.getFieldValue(13)).nextIsNull()) {
      assertNull(expected.bytes1);
    } else {
View Full Code Here

    } else {
      assertEquals(expected.float1.floatValue(), float1.get(), 0.0001);
    }

    OrcLazyDouble lazyDouble1 = (OrcLazyDouble) row.getFieldValue(12);
    DoubleWritable double1 = (DoubleWritable) lazyDouble1.materialize();
    if (double1 == null) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(), double1.get(), 0.0001);
    }
View Full Code Here

    OrcLazyDouble double1 = (OrcLazyDouble) row.getFieldValue(12);
    if (double1.nextIsNull()) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(),
          ((DoubleWritable) double1.materialize()).get(), 0.0001);
    }

    if (((OrcLazyObject) row.getFieldValue(13)).nextIsNull()) {
      assertNull(expected.bytes1);
    } else {
View Full Code Here

    } else {
      assertEquals(expected.float1.floatValue(), float1.get(), 0.0001);
    }

    OrcLazyDouble lazyDouble1 = (OrcLazyDouble) row.getFieldValue(12);
    DoubleWritable double1 = (DoubleWritable) lazyDouble1.materialize();
    if (double1 == null) {
      assertNull(expected.double1);
    } else {
      assertEquals(expected.double1.doubleValue(), double1.get(), 0.0001);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.