[ 
https://issues.apache.org/jira/browse/PARQUET-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fokko Driesprong resolved PARQUET-1924.
---------------------------------------
    Fix Version/s: 1.12.0
       Resolution: Fixed

> Do not Instantiate a New LongHashFunction 
> ------------------------------------------
>
>                 Key: PARQUET-1924
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1924
>             Project: Parquet
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 1.12.0
>
>
> {code:java|title=XxHash.java}
> /**
>  * The implementation of HashFunction interface. The XxHash uses XXH64 
> version xxHash
>  * with a seed of 0.
>  */
> public class XxHash implements HashFunction {
>   @Override
>   public long hashBytes(byte[] input) {
>     return LongHashFunction.xx(0).hashBytes(input);
>   }
>   @Override
>   public long hashByteBuffer(ByteBuffer input) {
>     return LongHashFunction.xx(0).hashBytes(input);
>   }
> {code}
> Since the seed is always zero, the {{static}} implementation provided by the 
> library can be used here.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to