Sha256: 260c5e40c1760f395f30e232772ac04ee3eb6df019b026140dd79841523f64f5

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

package org.embulk.formatter.avro.converter;

import org.apache.avro.Schema;

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

    @Override
    public Double longColumn(long value) {
        return Long.valueOf(value).doubleValue();
    }

    @Override
    public Double doubleColumn(double value) {
        return value;
    }

    @Override
    public Double stringColumn(String value) {
        return Double.parseDouble(value);
    }

    @Override
    public Double timestampColumn(String value) {
        return Double.parseDouble(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/AvroDoubleConverter.java
embulk-formatter-avro-0.1.1 src/main/java/org/embulk/formatter/avro/converter/AvroDoubleConverter.java
embulk-formatter-avro-0.1.0 src/main/java/org/embulk/formatter/avro/converter/AvroDoubleConverter.java