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