You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/04/27 22:31:10 UTC

[GitHub] [lucene] gsmiller opened a new pull request, #849: LUCENE-10530: Avoid floating point precision bug in TestTaxonomyFacetAssociations

gsmiller opened a new pull request, #849:
URL: https://github.com/apache/lucene/pull/849

   backport only


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] gsmiller commented on a diff in pull request #849: LUCENE-10530: Avoid floating point precision bug in TestTaxonomyFacetAssociations

Posted by GitBox <gi...@apache.org>.
gsmiller commented on code in PR #849:
URL: https://github.com/apache/lucene/pull/849#discussion_r860876168


##########
lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetAssociations.java:
##########
@@ -142,6 +146,34 @@ public static void beforeClass() throws Exception {
     reader = writer.getReader();
     writer.close();
     taxoReader = new DirectoryTaxonomyReader(taxoDir);
+
+    // To avoid floating point precision issues, it's useful to keep track of the values in the

Review Comment:
   Yeah, it appears so. I'm not an expert on floating point arithmetic by any means, but that's what I tracked the issue down to.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] msokolov commented on a diff in pull request #849: LUCENE-10530: Avoid floating point precision bug in TestTaxonomyFacetAssociations

Posted by GitBox <gi...@apache.org>.
msokolov commented on code in PR #849:
URL: https://github.com/apache/lucene/pull/849#discussion_r860303468


##########
lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetAssociations.java:
##########
@@ -142,6 +146,34 @@ public static void beforeClass() throws Exception {
     reader = writer.getReader();
     writer.close();
     taxoReader = new DirectoryTaxonomyReader(taxoDir);
+
+    // To avoid floating point precision issues, it's useful to keep track of the values in the

Review Comment:
   sneaky -- so when we sum a bunch of floats in a different order we get a different value? I did not know that. Nothing about floats is ever quite what you expect. 



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] gsmiller commented on pull request #849: LUCENE-10530: Avoid floating point precision bug in TestTaxonomyFacetAssociations

Posted by GitBox <gi...@apache.org>.
gsmiller commented on PR #849:
URL: https://github.com/apache/lucene/pull/849#issuecomment-1113534664

   Going ahead and merging since there didn't seem to be any major feedback on the approach and there are occasional test failures due to this. Happy to revisit the solution if anyone has further suggestions. Thanks!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] gsmiller merged pull request #849: LUCENE-10530: Avoid floating point precision bug in TestTaxonomyFacetAssociations

Posted by GitBox <gi...@apache.org>.
gsmiller merged PR #849:
URL: https://github.com/apache/lucene/pull/849


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org