com.clickzetta.platform.arrow.writer.IntegerWriter 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.IntVector;
public class IntegerWriter extends ArrowFieldWriter {
private static final int EMPTY_INT = 0;
private IntVector intVector;
public IntegerWriter(IntVector intVector) {
super(intVector);
this.intVector = intVector;
}
@Override
public void setNull() {
intVector.setNull(count);
}
@Override
void setDefaultValue() {
intVector.setSafe(count, EMPTY_INT);
}
@Override
void setValue(DataGetters row, int ordinal) {
intVector.setSafe(count, row.getInt(ordinal));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy