thomasrebele commented on code in PR #6194:
URL: https://github.com/apache/hive/pull/6194#discussion_r2538311285
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/columnstats/merge/DecimalColumnStatsMergerTest.java:
##########
@@ -180,47 +189,59 @@ public void testMergeNonNullValues() {
@Test
public void testDecimalCompareEqual() {
- assertTrue(DECIMAL_3.equals(DECIMAL_3));
+ assertTrue(DECIMAL_3.equals(getDecimal("3", 3, 0)));
Review Comment:
The original test was worse, as it used the same instance. Now the test
creates two different decimal objects with the same attributes, and check
whether they are equal.
The reason for test cases in general is to uncover unexpected behavior. The
test does not cost much, but might catch a problem in the future, so I would
just keep it.
--
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]