dongjoon-hyun commented on code in PR #56082:
URL: https://github.com/apache/spark/pull/56082#discussion_r3295536073
##########
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OnHeapColumnVector.java:
##########
@@ -146,10 +146,8 @@ public void putBoolean(int rowId, boolean value) {
@Override
public void putBooleans(int rowId, int count, boolean value) {
- byte v = (byte)((value) ? 1 : 0);
- for (int i = 0; i < count; ++i) {
- byteData[i + rowId] = v;
- }
+ byte v = (byte) (value ? 1 : 0);
+ java.util.Arrays.fill(byteData, rowId, rowId + count, v);
Review Comment:
Please remove unnecessary `java.util.` here because we import it already in
this file.
https://github.com/apache/spark/blob/8a0d85b4b9b30398176dd50fb59e758b530ec193/sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OnHeapColumnVector.java#L21
##########
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OnHeapColumnVector.java:
##########
@@ -191,9 +189,7 @@ public void putByte(int rowId, byte value) {
@Override
public void putBytes(int rowId, int count, byte value) {
- for (int i = 0; i < count; ++i) {
- byteData[i + rowId] = value;
- }
+ java.util.Arrays.fill(byteData, rowId, rowId + count, value);
Review Comment:
ditto.
--
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]