Examples of copyObject()


Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector.copyObject()

    });

    BooleanObjectInspector booleanOI = (BooleanObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.booleanTypeInfo);

    OrcLazyBoolean lazyBoolean2 = (OrcLazyBoolean) booleanOI.copyObject(lazyBoolean);

    Assert.assertEquals(true, ((BooleanWritable) lazyBoolean.materialize()).get());
    Assert.assertEquals(true, ((BooleanWritable) lazyBoolean2.materialize()).get());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector.copyObject()

    });

    BooleanObjectInspector booleanOI = (BooleanObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.booleanTypeInfo);

    OrcLazyBoolean lazyBoolean2 = (OrcLazyBoolean) booleanOI.copyObject(lazyBoolean);

    Assert.assertEquals(true, ((BooleanWritable) lazyBoolean.materialize()).get());
    Assert.assertEquals(true, ((BooleanWritable) lazyBoolean2.materialize()).get());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector.copyObject()

    });

    ByteObjectInspector byteOI = (ByteObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.byteTypeInfo);

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

    Assert.assertEquals(1, ((ByteWritable) lazyByte.materialize()).get());
    Assert.assertEquals(1, ((ByteWritable) lazyByte2.materialize()).get());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector.copyObject()

    });

    ByteObjectInspector byteOI = (ByteObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.byteTypeInfo);

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

    Assert.assertEquals(1, ((ByteWritable) lazyByte.materialize()).get());
    Assert.assertEquals(1, ((ByteWritable) lazyByte2.materialize()).get());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector.copyObject()

    });

    DoubleObjectInspector doubleOI = (DoubleObjectInspector)
        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());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector.copyObject()

    });

    DoubleObjectInspector doubleOI = (DoubleObjectInspector)
        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());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.FloatObjectInspector.copyObject()

    });

    FloatObjectInspector floatOI = (FloatObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.floatTypeInfo);

    OrcLazyFloat lazyFloat2 = (OrcLazyFloat) floatOI.copyObject(lazyFloat);

    Assert.assertEquals(1.0f, ((FloatWritable) lazyFloat.materialize()).get());
    Assert.assertEquals(1.0f, ((FloatWritable) lazyFloat2.materialize()).get());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.FloatObjectInspector.copyObject()

    });

    FloatObjectInspector floatOI = (FloatObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.floatTypeInfo);

    OrcLazyFloat lazyFloat2 = (OrcLazyFloat) floatOI.copyObject(lazyFloat);

    Assert.assertEquals(1.0f, ((FloatWritable) lazyFloat.materialize()).get());
    Assert.assertEquals(1.0f, ((FloatWritable) lazyFloat2.materialize()).get());
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveCharObjectInspector.copyObject()

        HiveCharObjectInspector inspector = (HiveCharObjectInspector) serde.getInspector();

        StringOption option = new StringOption("hello");
        HiveChar value = new HiveChar("hello", 10);

        assertThat(inspector.copyObject(option), is((Object) option));
        assertThat(inspector.copyObject(option), is(not(sameInstance((Object) option))));
        assertThat(inspector.copyObject(null), is(nullValue()));
        assertThat(inspector.getPrimitiveJavaObject(option), is(value));
        assertThat(inspector.getPrimitiveJavaObject(null), is(nullValue()));
        assertThat(inspector.getPrimitiveWritableObject(option), is(new HiveCharWritable(value)));
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.HiveCharObjectInspector.copyObject()

        StringOption option = new StringOption("hello");
        HiveChar value = new HiveChar("hello", 10);

        assertThat(inspector.copyObject(option), is((Object) option));
        assertThat(inspector.copyObject(option), is(not(sameInstance((Object) option))));
        assertThat(inspector.copyObject(null), is(nullValue()));
        assertThat(inspector.getPrimitiveJavaObject(option), is(value));
        assertThat(inspector.getPrimitiveJavaObject(null), is(nullValue()));
        assertThat(inspector.getPrimitiveWritableObject(option), is(new HiveCharWritable(value)));
        assertThat(inspector.getPrimitiveWritableObject(null), is(nullValue()));
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.