rpuch commented on code in PR #814: URL: https://github.com/apache/ignite-3/pull/814#discussion_r877784167
########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/LinkRowId.java: ########## @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.storage.pagememory.mv; + +import org.apache.ignite.internal.pagememory.util.PageIdUtils; +import org.apache.ignite.internal.storage.RowId; + +/** + * {@link RowId} implementation which identifies the row data using row link in page-memory. + * + * @see RowId + * @see PageIdUtils#link(long, int) + */ +public class LinkRowId implements RowId { + private final long rowLink; + + public LinkRowId(long rowLink) { + this.rowLink = rowLink; + } + + @Override + public int partitionId() { + long pageId = PageIdUtils.pageId(rowLink); + return PageIdUtils.partitionId(pageId); Review Comment: Why do we need a separating line here? Separating lines separate blocks of code, like '3 lines doing a coherent job, then 2 lines doing another coherent job'. Here, both lines do the same coherent job, so they form one 'block', so no separating lines seems to be needed. -- 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]
