com.clickzetta.platform.arrow.writer.FloatWriter 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.Float4Vector;
public class FloatWriter extends ArrowFieldWriter {
private static final float EMPTY_FLOAT = 0.0f;
private Float4Vector float4Vector;
public FloatWriter(Float4Vector float4Vector) {
super(float4Vector);
this.float4Vector = float4Vector;
}
@Override
public void setNull() {
float4Vector.setNull(count);
}
@Override
void setDefaultValue() {
float4Vector.setSafe(count, EMPTY_FLOAT);
}
@Override
void setValue(DataGetters row, int ordinal) {
float4Vector.setSafe(count, row.getFloat(ordinal));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy