You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2021/10/23 23:39:38 UTC

[GitHub] [lucenenet] NightOwl888 opened a new pull request #529: Fix for .NET Framework x86 Support

NightOwl888 opened a new pull request #529:
URL: https://github.com/apache/lucenenet/pull/529


   See #269.
   
   This fixes the following tests so they don't fail on .NET Framework x86 with optimizations enabled (without working around the problem by disabling optimizations):
   
   ## Failed due to cast from `float` to `double` causing a change of value
   
   - `Lucene.Net.Expressions.TestExpressionSorts::TestQueries()`
   
   This was fixed by adding an intermediate cast to `decimal` on .NET Framework and .NET Standard 2.0 only
   
   ## Failed due to equality comparisons between float data type values
   
   - `Lucene.Net.Sandbox.TestSlowFuzzyQuery::TestTieBreaker()`
   - `Lucene.Net.Sandbox.TestSlowFuzzyQuery::TestTokenLengthOpt()`
   - `Lucene.Net.Search.TestBooleanQuery::TestBS2DisjunctionNextVsAdvance()`
   - `Lucene.Net.Search.TestFuzzyQuery::TestTieBreaker()`
   - `Lucene.Net.Search.TestSearchAfter::TestQueries()`
   - `Lucene.Net.Search.TestTopDocsMerge::TestSort_1()`
   - `Lucene.Net.Search.TestTopDocsMerge::TestSort_2()`
   
   These were fixed by using the [`Lucene.Net.Util.NumericUtils::SingleToSortableInt32()`](https://github.com/apache/lucenenet/blob/dd7ed62e9bfc455c9b39ea5d33a783a93280b739/src/Lucene.Net/Util/NumericUtils.cs#L336-L356) method to compare the raw bits for equality. This change doesn't impact performance or behavior of the application as using an approximate float comparison would.
   
   This also fixes Lucene.Net.Expressions.ExpressionComparer to use `J2N.Collections.Generic.Comparer<double>` to ensure we use the same floating point comparison logic as Java.
   


-- 
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: dev-unsubscribe@lucenenet.apache.org

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



[GitHub] [lucenenet] NightOwl888 merged pull request #529: Fix for .NET Framework x86 Support

Posted by GitBox <gi...@apache.org>.
NightOwl888 merged pull request #529:
URL: https://github.com/apache/lucenenet/pull/529


   


-- 
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: dev-unsubscribe@lucenenet.apache.org

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