Package com.asakusafw.directio.hive.parquet.mock

Examples of com.asakusafw.directio.hive.parquet.mock.WithStringSupports


        edits.put("decimal", StringValueSerdeFactory.DECIMAL);
        edits.put("date", StringValueSerdeFactory.DATE);
        edits.put("datetime", StringValueSerdeFactory.DATETIME);
        ParquetFileFormat<WithStringSupports> format = format(WithStringSupports.class, edits);

        WithStringSupports in = new WithStringSupports();
        in.decimal.modify(new BigDecimal("123.45"));
        in.date.modify(new Date(2014, 7, 1));
        in.datetime.modify(new DateTime(2014, 7, 1, 12, 34, 56));

        WithStringSupports out = restore(format, in);
        assertThat(out.decimal, is(in.decimal));
        assertThat(out.date, is(in.date));
        assertThat(out.datetime, is(in.datetime));
    }
View Full Code Here


        ParquetFileFormat<WithStringSupports> format = format(WithStringSupports.class, edits);

        int count = 1000;
        List<WithStringSupports> inputs = new ArrayList<WithStringSupports>();
        for (int i = 0; i < count; i++) {
            WithStringSupports object = new WithStringSupports();
            object.decimal.modify(new BigDecimal("123.45"));
            object.date.modify(new Date(2014, 7, 1));
            object.datetime.modify(new DateTime(2014, 7, 1, 12, 34, 56));
            inputs.add(object);
        }
        WithStringSupports sample = inputs.get(0);
        List<WithStringSupports> outputs = restore(format, inputs);
        for (WithStringSupports out : outputs) {
            assertThat(out.decimal, is(sample.decimal));
            assertThat(out.date, is(sample.date));
            assertThat(out.datetime, is(sample.datetime));
View Full Code Here

TOP

Related Classes of com.asakusafw.directio.hive.parquet.mock.WithStringSupports

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.