Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10961#discussion_r51088280
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OffHeapColumnVector.java
 ---
    @@ -217,6 +269,41 @@ public final long getLong(int rowId) {
       }
     
       //
    +  // APIs dealing with floats
    +  //
    +
    +  @Override
    +  public final void putFloat(int rowId, float value) {
    +    Platform.putFloat(null, data + rowId * 4, value);
    +  }
    +
    +  @Override
    +  public final void putFloats(int rowId, int count, float value) {
    +    long offset = data + 4 * rowId;
    +    for (int i = 0; i < count; ++i, offset += 4) {
    +      Platform.putFloat(null, offset, value);
    +    }
    +  }
    +
    +  @Override
    +  public final void putFloats(int rowId, int count, float[] src, int 
srcIndex) {
    +    Platform.copyMemory(src, Platform.DOUBLE_ARRAY_OFFSET + srcIndex * 4,
    +        null, data + 4 * rowId, count * 4);
    +  }
    +
    +  @Override
    +  public final void putFloats(int rowId, int count, byte[] src, int 
srcIndex) {
    +    Platform.copyMemory(src, Platform.DOUBLE_ARRAY_OFFSET + srcIndex,
    --- End diff --
    
    byte offset here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to