rdblue commented on a change in pull request #1287:
URL: https://github.com/apache/iceberg/pull/1287#discussion_r464643993
##########
File path:
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorizedArrowReader.java
##########
@@ -356,5 +356,36 @@ public String toString() {
public void setBatchSize(int batchSize) {}
}
+ /**
+ * A Dummy Vector Reader which doesn't actually read files, instead it
returns a dummy
+ * VectorHolder which indicates the constant value which should be used for
this column.
+ * @param <T> The constant value to use
+ */
+ public static class ConstantVectorReader<T> extends VectorizedArrowReader {
+ private final T value;
+
+ public ConstantVectorReader(T value) {
+ this.value = value;
+ }
+
+ @Override
+ public VectorHolder read(VectorHolder reuse, int numValsToRead) {
+ return VectorHolder.constantHolder(numValsToRead, value);
Review comment:
If it is always null, you can use the `Void` type.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]