mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.0' into cassandra-4.1
This commit is contained in:
commit
d320cef8f9
|
|
@ -8,6 +8,7 @@ Merged from 4.0:
|
|||
* Fix Down nodes counter in nodetool describecluster (CASSANDRA-18512)
|
||||
* Remove unnecessary shuffling of GossipDigests in Gossiper#makeRandomGossipDigest (CASSANDRA-18546)
|
||||
Merged from 3.11:
|
||||
* Fix CAST function for float to decimal (CASSANDRA-18647)
|
||||
* Suppress CVE-2022-45688 (CASSANDRA-18643)
|
||||
* Remove unrepaired SSTables from garbage collection when only_purge_repaired_tombstones is true (CASSANDRA-14204)
|
||||
* Wait for live endpoints in gossip waiting to settle (CASSANDRA-18543)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,10 @@ public final class CastFcts
|
|||
*/
|
||||
private static <I extends Number> java.util.function.Function<I, BigDecimal> getDecimalConversionFunction(AbstractType<? extends Number> inputType)
|
||||
{
|
||||
if (inputType == FloatType.instance || inputType == DoubleType.instance)
|
||||
if (inputType == FloatType.instance)
|
||||
return p -> new BigDecimal(Float.toString(p.floatValue()));
|
||||
|
||||
if (inputType == DoubleType.instance)
|
||||
return p -> BigDecimal.valueOf(p.doubleValue());
|
||||
|
||||
if (inputType == IntegerType.instance)
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public class CastFctsTest extends CQLTester
|
|||
BigDecimal.valueOf(2),
|
||||
BigDecimal.valueOf(3),
|
||||
BigDecimal.valueOf(4),
|
||||
BigDecimal.valueOf(5.2F),
|
||||
new BigDecimal("5.2"),
|
||||
BigDecimal.valueOf(6.3),
|
||||
BigDecimal.valueOf(6.3),
|
||||
BigDecimal.valueOf(4),
|
||||
|
|
|
|||
Loading…
Reference in New Issue