Examples of materialize()


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

        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.binaryTypeInfo);

    OrcLazyBinary lazyBinary2 = (OrcLazyBinary) binaryOI.copyObject(lazyBinary);

    Assert.assertEquals("a", new String(((BytesWritable) lazyBinary.materialize()).getBytes()));
    Assert.assertEquals("a", new String(((BytesWritable) lazyBinary2.materialize()).getBytes()));
  }

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

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

    OrcLazyBoolean boolean1 = (OrcLazyBoolean) row.getFieldValue(0);
    if (boolean1.nextIsNull()) {
      assertNull(expected.boolean1);
    } else {
      assertEquals(expected.boolean1.booleanValue(),
          ((BooleanWritable) boolean1.materialize()).get());
    }

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

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

        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.byteTypeInfo);

    OrcLazyByte lazyByte2 = (OrcLazyByte) byteOI.copyObject(lazyByte);

    Assert.assertEquals(1, ((ByteWritable) lazyByte.materialize()).get());
    Assert.assertEquals(1, ((ByteWritable) lazyByte2.materialize()).get());
  }

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

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

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

    OrcLazyFloat float1 = (OrcLazyFloat) row.getFieldValue(11);
    if (float1.nextIsNull()) {
      assertNull(expected.float1);
    } else {
      assertEquals(expected.float1.floatValue(),
          ((FloatWritable) float1.materialize()).get(), 0.0001);
    }

    OrcLazyDouble double1 = (OrcLazyDouble) row.getFieldValue(12);
    if (double1.nextIsNull()) {
      assertNull(expected.double1);
View Full Code Here

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

    OrcLazyInt int1 = (OrcLazyInt)row.getFieldValue(3);
    if (int1.nextIsNull()) {
      assertNull(expected.int1);
    } else {
      assertEquals(expected.int1.intValue(),
          ((IntWritable) int1.materialize()).get());
    }

    OrcLazyLong long1 = (OrcLazyLong)row.getFieldValue(4);
    if (long1.nextIsNull()) {
      assertNull(expected.long1);
View Full Code Here

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

    OrcLazyInt int2 = (OrcLazyInt) row.getFieldValue(6);
    if (int2.nextIsNull()) {
      assertNull(expected.int2);
    } else {
      assertEquals(expected.int2.intValue(),
          ((IntWritable) int2.materialize()).get());
    }

    OrcLazyLong long2 = (OrcLazyLong) row.getFieldValue(7);
    if (long2.nextIsNull()) {
      assertNull(expected.long2);
View Full Code Here

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

    OrcLazyInt int3 = (OrcLazyInt) row.getFieldValue(9);
    if (int3.nextIsNull()) {
      assertNull(expected.int3);
    } else {
      assertEquals(expected.int3.intValue(),
          ((IntWritable) int3.materialize()).get());
    }

    OrcLazyLong long3 = (OrcLazyLong) row.getFieldValue(10);
    if (long3.nextIsNull()) {
      assertNull(expected.long3);
View Full Code Here

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

    } else {
      assertEquals(expected.short1.shortValue(), short1.get());
    }

    OrcLazyInt lazyInt1 = (OrcLazyInt) row.getFieldValue(3);
    IntWritable int1 = (IntWritable) lazyInt1.materialize();
    if (int1 == null) {
      assertNull(expected.int1);
    } else {
      assertEquals(expected.int1.intValue(), int1.get());
    }
View Full Code Here

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

    } else {
      assertEquals(expected.short2.shortValue(), short2.get());
    }

    OrcLazyInt lazyInt2 = (OrcLazyInt) row.getFieldValue(6);
    IntWritable int2 = (IntWritable) lazyInt2.materialize();
    if (int2 == null) {
      assertNull(expected.int2);
    } else {
      assertEquals(expected.int2.intValue(), int2.get());
    }
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.