bool operator==(const Layout &lhs, const Layout &rhs) { // Check the equality of layout_type_ if (lhs.layout_type_ != rhs.layout_type_) { return false; } // Check the equality of layout_oid_ if (lhs.GetOid() != rhs.GetOid()) { return false; } // Check the equality of column_count_ if (lhs.GetColumnCount() != rhs.GetColumnCount()) { return false; } // Check for the equality of the column_layout_ for // LayoutType::HYBRID if (lhs.layout_type_ == LayoutType::HYBRID) { return (lhs.column_layout_ == rhs.column_layout_); } // In case of LayoutType::ROW or LayoutType::COLUMN, // there is no need to check for column_layout_ equality return true; }