rdblue commented on a change in pull request #1287:
URL: https://github.com/apache/iceberg/pull/1287#discussion_r464567794
##########
File path:
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorHolder.java
##########
@@ -91,17 +91,44 @@ public int numValues() {
return vector.getValueCount();
}
+ public static VectorHolder constantHolder(int numRows, Object constantValue)
{
+ return new DummyVectorHolder(numRows, constantValue);
+ }
+
public static VectorHolder dummyHolder(int numRows) {
- return new VectorHolder() {
- @Override
- public int numValues() {
- return numRows;
- }
- };
+ return new DummyVectorHolder(numRows);
}
public boolean isDummy() {
return vector == null;
}
+ /**
+ * A Vector Holder which does not actually produce values, consumers of this
class should
+ * use the constantValue to populate their ColumnVector implementation.
+ */
+ public static class DummyVectorHolder extends VectorHolder {
Review comment:
Could we rename this to `ConstantVectorHolder` instead of "dummy"? Now
that it returns a constant value, I think it's more accurate to use "constant".
----------------------------------------------------------------
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]