Conversation
56a6498 to
2fe3004
Compare
tdcmeehan
left a comment
There was a problem hiding this comment.
Some initial comments. I would also move these classes into their own package for now, com.facebook.presto.operator.scalar.tdigest
presto-main/src/main/java/com/facebook/presto/operator/scalar/Centroid.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/ScaleFunction.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/ScaleFunction.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/TDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/TDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/Sort.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/Sort.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
rongrong
left a comment
There was a problem hiding this comment.
Personally I don't think changing variable names are necessary (yes, longer names are more readable, but for algorithms like this readable names is not that critical to understanding it anyways. I feel safer to see they are not changed from the original. Just personal opinion.), also it's not clear to me why a lot of comments are removed. Reducing these would make reviewing easier.
presto-main/src/main/java/com/facebook/presto/operator/scalar/Centroid.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
It's a bit strange to see hashCode and equals not based on the same variables. What's the reason behind this?
There was a problem hiding this comment.
Each instance of a centroid has a unique id, even if the centroid contains the same values. Therefore, if we compare by id, it would always return false.
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/Centroid.java
Outdated
Show resolved
Hide resolved
2cfea70 to
078308b
Compare
presto-main/src/main/java/com/facebook/presto/operator/scalar/Centroid.java
Outdated
Show resolved
Hide resolved
5c3169a to
532fb28
Compare
presto-main/src/main/java/com/facebook/presto/operator/scalar/tdigest/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/tdigest/MergingDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/tdigest/TDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/tdigest/TDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/com/facebook/presto/operator/scalar/tdigest/BenchmarkTDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/com/facebook/presto/operator/scalar/tdigest/BenchmarkTDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/com/facebook/presto/operator/scalar/tdigest/BenchmarkTDigest.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/operator/scalar/tdigest/TDigestUtils.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/com/facebook/presto/operator/scalar/tdigest/TestTDigest.java
Outdated
Show resolved
Hide resolved
c6fe433 to
9fba397
Compare
wenleix
left a comment
There was a problem hiding this comment.
"Add implementation of T-Digest"
Maybe also add commit message like "This commit copied the original code as it is intentionally. Refactored will be done in future commits"
This commit copied the original code as it is intentionally. Refactoring will be done in future commits.
b44c56d to
3aabb13
Compare
|
There's some copy paste in the graffle metadata. Other than that I think this is good to merge @rongrong |
1f33404 to
1f03ac6
Compare
presto-main/src/main/java/com/facebook/presto/tdigest/TDigestUtils.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/tdigest/docs/tdigest.graffle
Outdated
Show resolved
Hide resolved
a81e903 to
f239e1d
Compare
Remove unnecessary functions for Presto t-digest needs.
This adds documentation for the t-digest type (prestodb#15674), similar to what already exists for the QDigest type. The t-digest library was added in prestodb#12961 and functions to use it were added in prestodb#13940.
Add t-digest to Presto, which allows faster and more accurate results when calculating quantiles while saving space in memory. In reference to issue #12929.
Note
We make intentional decision to just copy the existing implementation for now. See #12961 (review) and #12961 (comment)