gortiz commented on code in PR #16021:
URL: https://github.com/apache/pinot/pull/16021#discussion_r2132011159
##########
pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/operator/SortOperatorTest.java:
##########
@@ -472,6 +473,29 @@ public void shouldHandleMultipleCollationKeysWithNulls() {
assertTrue(operator.nextBlock().isSuccess(), "expected EOS block to
propagate");
}
+ @Test
+ public void shouldPreservePrecision() {
+ // Given:
+ DataSchema schema = new DataSchema(new String[]{"sort"}, new
DataSchema.ColumnDataType[]{LONG});
+ // Insert 3 large long values which will be the same if converted to
double due to precision loss.
Review Comment:
I also find the text a bit confusing. That _same_ could mean:
* `largeValue = (long) ((double) largeValue)`, which is what I (and maybe
Ankit) understood first.
* `(double) largeValue = (double) (largeValue + 1) = (double) (largeValue +
1)`, which is what I understand you mean.
Suggestion: Let's rephrase that to something like:
> Insert three consecutive numbers that are so large that they are
represented by the same double value
--
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]