Examples of copyObject()


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

    });

    LongObjectInspector longOI = (LongObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.longTypeInfo);

    OrcLazyLong lazyLong2 = (OrcLazyLong) longOI.copyObject(lazyLong);

    Assert.assertEquals(1, ((LongWritable) lazyLong.materialize()).get());
    Assert.assertEquals(1, ((LongWritable) lazyLong2.materialize()).get());
  }
View Full Code Here

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

    });

    ShortObjectInspector shortOI = (ShortObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.shortTypeInfo);

    OrcLazyShort lazyShort2 = (OrcLazyShort) shortOI.copyObject(lazyShort);

    Assert.assertEquals(1, ((ShortWritable) lazyShort.materialize()).get());
    Assert.assertEquals(1, ((ShortWritable) lazyShort2.materialize()).get());
  }
View Full Code Here

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

    });

    ShortObjectInspector shortOI = (ShortObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.shortTypeInfo);

    OrcLazyShort lazyShort2 = (OrcLazyShort) shortOI.copyObject(lazyShort);

    Assert.assertEquals(1, ((ShortWritable) lazyShort.materialize()).get());
    Assert.assertEquals(1, ((ShortWritable) lazyShort2.materialize()).get());
  }
View Full Code Here

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

    });

    StringObjectInspector stringOI = (StringObjectInspector)
        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.stringTypeInfo);

    OrcLazyString lazyString2 = (OrcLazyString) stringOI.copyObject(lazyString);

    Assert.assertEquals("a", ((Text) lazyString.materialize()).toString());
    Assert.assertEquals("a", ((Text) lazyString2.materialize()).toString());
  }
View Full Code Here

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

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

        DecimalOption option = new DecimalOption(new BigDecimal("123.45"));
        String value = "123.45";

        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 Text(value)));
View Full Code Here

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

        DecimalOption option = new DecimalOption(new BigDecimal("123.45"));
        String value = "123.45";

        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 Text(value)));
        assertThat(inspector.getPrimitiveWritableObject(null), is(nullValue()));
View Full Code Here

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

        DecimalOption option = new DecimalOption(new BigDecimal("123.45"));
        String value = "123.45";

        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 Text(value)));
        assertThat(inspector.getPrimitiveWritableObject(null), is(nullValue()));
View Full Code Here

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

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

        DateOption option = new DateOption(new Date(2014, 7, 1));
        String value = "2014-07-01";

        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 Text(value)));
View Full Code Here

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

        DateOption option = new DateOption(new Date(2014, 7, 1));
        String value = "2014-07-01";

        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 Text(value)));
        assertThat(inspector.getPrimitiveWritableObject(null), is(nullValue()));
View Full Code Here

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

        DateOption option = new DateOption(new Date(2014, 7, 1));
        String value = "2014-07-01";

        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 Text(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.