com.clickzetta.platform.arrow.writer.DoubleWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.arrow.writer;
import com.clickzetta.platform.catalyst.data.DataGetters;
import org.apache.arrow.vector.Float8Vector;
public class DoubleWriter extends ArrowFieldWriter {
private static final double EMPTY_DOUBLE = 0.0d;
private Float8Vector float8Vector;
public DoubleWriter(Float8Vector float8Vector) {
super(float8Vector);
this.float8Vector = float8Vector;
}
@Override
public void setNull() {
float8Vector.setNull(count);
}
@Override
void setDefaultValue() {
float8Vector.setSafe(count, EMPTY_DOUBLE);
}
@Override
void setValue(DataGetters row, int ordinal) {
float8Vector.setSafe(count, row.getDouble(ordinal));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy