kazuyukitanimura commented on a change in pull request #34611:
URL: https://github.com/apache/spark/pull/34611#discussion_r751886523
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java
##########
@@ -470,6 +493,14 @@ public final int appendBooleans(int count, boolean v) {
return result;
}
+ public final int appendBooleans(int count, int src, int offset) {
Review comment:
Updated
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/WritableColumnVector.java
##########
@@ -201,6 +215,15 @@ public WritableColumnVector reserveDictionaryIds(int
capacity) {
*/
public abstract void putBooleans(int rowId, int count, boolean value);
+ /**
+ * Sets bits from [src[srcIndex], src[srcIndex + count]) to [rowId, rowId +
count)
+ * src must be positive and contain 8 bits of bitmask in the lowest byte.
+ */
+ public void putBooleans(int rowId, int count, int src, int srcIndex) {
+ putBytes(rowId, count,
ByteBuffer.wrap(byte8).putLong(toBitPerByte(src)).array(), srcIndex);
+ }
+ public void putBooleans(int rowId, int src) { putBooleans(rowId, 8, src, 0);
}
Review comment:
Updated
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
##########
@@ -130,6 +130,47 @@ class ColumnarBatchSuite extends SparkFunSuite {
}
}
+ testVector("[SPARK35867] Boolean APIs", 1024, BooleanType) {
Review comment:
Updated
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
##########
@@ -130,6 +130,47 @@ class ColumnarBatchSuite extends SparkFunSuite {
}
}
+ testVector("[SPARK35867] Boolean APIs", 1024, BooleanType) {
+ column => ()
Review comment:
Updated
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]