paul-rogers commented on a change in pull request #1383: DRILL-6613: Refactor
MaterializedField
URL: https://github.com/apache/drill/pull/1383#discussion_r203253013
##########
File path:
exec/java-exec/src/test/java/org/apache/drill/exec/record/TestMaterializedField.java
##########
@@ -58,32 +58,24 @@ public void initialize() {
}
@Test
- public void testClone() {
- final MaterializedField cloneParent = parent.clone();
- final boolean isParentEqual = parent.equals(cloneParent);
- assertTrue("Cloned parent does not match the original", isParentEqual);
+ public void testCopy() {
+ final MaterializedField cloneParent = parent.copy();
+ assertEquals("Parent copy does not match the original", parent,
cloneParent);
Review comment:
Call me paranoid, but this is using one of the functions I'd be worried
about. If someone omits some fields from the `equals()` implementation, we'll
get a false positive.
Would seem better to do a full test of `equals()`, and only then use it in
tests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services