Sha256: cbdebcbd39700029e699a9522ebbe4a10b9fa29f4dc2e44122505bae3a6bd236

Contents?: true

Size: 672 Bytes

Versions: 3

Compression:

Stored size: 672 Bytes

Contents

package org.embulk.formatter.avro.converter;

import org.apache.avro.Schema;

public class AvroIntConverter extends AbstractAvroValueConverter {
    public AvroIntConverter(Schema schema) {
        super(schema);
    }

    @Override
    public Integer longColumn(long value) {
        return Long.valueOf(value).intValue();
    }

    @Override
    public Integer doubleColumn(double value) {
        return Double.valueOf(value).intValue();
    }

    @Override
    public Integer stringColumn(String value) {
        return Integer.parseInt(value);
    }

    @Override
    public Integer timestampColumn(String value) {
        return Integer.parseInt(value);
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
embulk-formatter-avro-0.2.1 src/main/java/org/embulk/formatter/avro/converter/AvroIntConverter.java
embulk-formatter-avro-0.1.1 src/main/java/org/embulk/formatter/avro/converter/AvroIntConverter.java
embulk-formatter-avro-0.1.0 src/main/java/org/embulk/formatter/avro/converter/AvroIntConverter.java