yihua commented on pull request #3952:
URL: https://github.com/apache/hudi/pull/3952#issuecomment-980488047
> @vinothchandar @yihua . can we still use the orginal code instead of use
com.github.davidmoten: the Hilbert curve package directly
I think if that library has some performance issue we have to use your
original code. But I might know the difference between your code vs the
`com.github.davidmoten:hilbert-curve` lib. So in the current PR, I have the
following conversion, which generates the byte array to put into the range:
```
public static byte[] indexBytes(HilbertCurve hilbertCurve, long[] points) {
BigInteger index = hilbertCurve.index(points);
return index.toByteArray();
}
```
instead of directly returning the internal byte array (currently it's
internal byte array -> BigInteger -> BigInteger.toByteArray()). And I guess
maybe BigInteger.toByteArray() messes things up.
--
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]