Add equals and hashcode methods to ConnectorNewTableLayout
@@ -16,6 +16,7 @@ package com.facebook.presto.spi;
import com.facebook.presto.spi.connector.ConnectorPartitioningHandle;
import java.util.List;
+import java.util.Objects;
import static java.util.Objects.requireNonNull;
@@ -39,4 +40,24 @@ public class ConnectorNewTableLayout
{
return partitionColumns;
}
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ConnectorNewTableLayout that = (ConnectorNewTableLayout) o;
+ return Objects.equals(partitioning, that.partitioning) &&
+ Objects.equals(partitionColumns, that.partitionColumns);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return Objects.hash(partitioning, partitionColumns);
+ }
}
