Sha256: 2fb4efe8f3c40e99a07c378136ae86419513ab86925b772796e7aad054cacd46
Contents?: true
Size: 1009 Bytes
Versions: 4
Compression:
Stored size: 1009 Bytes
Contents
package org.embulk.parser.avro.getter; import org.embulk.spi.Column; import org.embulk.spi.PageBuilder; import org.embulk.spi.time.TimestampParser; import org.msgpack.value.Value; public class GenericDataColumnGetter extends BaseColumnGetter { public GenericDataColumnGetter(PageBuilder pageBuilder, TimestampParser[] timestampParsers) { super(pageBuilder, timestampParsers); } @Override public void stringColumn(Column column) { if (this.value == null) { pageBuilder.setNull(column); } else { Value converted = AvroGenericDataConverter.convert(value); pageBuilder.setString(column, converted.toString()); } } @Override public void jsonColumn(Column column) { if (this.value == null) { pageBuilder.setNull(column); } else { Value converted = AvroGenericDataConverter.convert(value); pageBuilder.setJson(column, converted); } } }
Version data entries
4 entries across 4 versions & 1 rubygems