@Test public void testGetFields_Primitive() throws IOException { schema = getParquetSchemaForPrimitiveTypes(Type.Repetition.OPTIONAL, true); context.setMetadata(schema); context.setTupleDescription(getColumnDescriptorsFromSchema(schema)); resolver.initialize(context); List<Group> groups = readParquetFile("primitive_types.parquet", 25, schema); assertEquals(25, groups.size()); List<OneField> fields = assertRow(groups, 0, 16); assertField(fields, 0, "row1", DataType.TEXT); assertField(fields, 1, "s_6", DataType.TEXT); assertField(fields, 2, 1, DataType.INTEGER); assertField(fields, 3, 6.0d, DataType.FLOAT8); assertField(fields, 4, BigDecimal.valueOf(1234560000000000000L, 18), DataType.NUMERIC); assertField(fields, 5, localTimestampString, DataType.TIMESTAMP); assertField(fields, 6, 7.7f, DataType.REAL); assertField(fields, 7, 23456789L, DataType.BIGINT); assertField(fields, 8, false, DataType.BOOLEAN); assertField(fields, 9, (short) 1, DataType.SMALLINT); assertField(fields, 10, (short) 10, DataType.SMALLINT); assertField(fields, 11, "abcd", DataType.TEXT); assertField(fields, 12, "abc", DataType.TEXT); assertField(fields, 13, new byte[]{(byte) 49}, DataType.BYTEA); assertField(fields, 14, localTimestampString, DataType.TIMESTAMP); assertField(fields, 15, localTimestampString, DataType.TIMESTAMP); fields = assertRow(groups, 11, 16); assertField(fields, 1, null, DataType.TEXT); fields = assertRow(groups, 12, 16); assertField(fields, 2, null, DataType.INTEGER); fields = assertRow(groups, 13, 16); assertField(fields, 3, null, DataType.FLOAT8); fields = assertRow(groups, 14, 16); assertField(fields, 4, null, DataType.NUMERIC); fields = assertRow(groups, 15, 16); assertField(fields, 5, null, DataType.TIMESTAMP); fields = assertRow(groups, 16, 16); assertField(fields, 6, null, DataType.REAL); fields = assertRow(groups, 17, 16); assertField(fields, 7, null, DataType.BIGINT); fields = assertRow(groups, 18, 16); assertField(fields, 8, null, DataType.BOOLEAN); fields = assertRow(groups, 19, 16); assertField(fields, 9, null, DataType.SMALLINT); fields = assertRow(groups, 20, 16); assertField(fields, 10, null, DataType.SMALLINT); fields = assertRow(groups, 22, 16); assertField(fields, 11, null, DataType.TEXT); fields = assertRow(groups, 23, 16); assertField(fields, 12, null, DataType.TEXT); fields = assertRow(groups, 24, 16); assertField(fields, 13, null, DataType.BYTEA); }
@Override public void initialize(RequestContext requestContext) { super.initialize(requestContext); this.columnDescriptors = context.getTupleDescription(); }
ParquetResolver extends BasePlugin implements Resolver { @Override public void initialize(RequestContext requestContext) { super.initialize(requestContext); this.columnDescriptors = context.getTupleDescription(); } }
ParquetResolver extends BasePlugin implements Resolver { @Override public void initialize(RequestContext requestContext) { super.initialize(requestContext); this.columnDescriptors = context.getTupleDescription(); } ParquetResolver();   ParquetResolver(ConfigurationFactory configurationFactory); }
ParquetResolver extends BasePlugin implements Resolver { @Override public void initialize(RequestContext requestContext) { super.initialize(requestContext); this.columnDescriptors = context.getTupleDescription(); } ParquetResolver();   ParquetResolver(ConfigurationFactory configurationFactory); @Override void initialize(RequestContext requestContext); @Override List<OneField> getFields(OneRow row); @Override OneRow setFields(List<OneField> record); }
ParquetResolver extends BasePlugin implements Resolver { @Override public void initialize(RequestContext requestContext) { super.initialize(requestContext); this.columnDescriptors = context.getTupleDescription(); } ParquetResolver();   ParquetResolver(ConfigurationFactory configurationFactory); @Override void initialize(RequestContext requestContext); @Override List<OneField> getFields(OneRow row); @Override OneRow setFields(List<OneField> record); static final Pattern TIMESTAMP_PATTERN; }