siddharthteotia commented on a change in pull request #5625:
URL: https://github.com/apache/incubator-pinot/pull/5625#discussion_r448681078



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/io/writer/ForwardIndexWriter.java
##########
@@ -0,0 +1,138 @@
+/**
+ * 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.pinot.core.io.writer;
+
+import java.io.Closeable;
+
+
+/**
+ * Interface for forward index writer.
+ * <p>TODO: Remove this interface and merge the writer implementations into 
the ForwardIndexCreator implementations.

Review comment:
       This doesn't sound good. Why are we adding it now if we already know it 
will be deleted in the future?
   
   On that note, why do we need ForwardIndexCreator and ForwardIndexWriter? We 
might as well use the writer directly. The segment generation code instantiates 
creators -> creators instantiate writer. Can we just use writer or one of them 
whichever is suitable?

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/io/writer/impl/BaseChunkSVForwardIndexWriter.java
##########
@@ -27,21 +27,20 @@
 import java.nio.channels.FileChannel;
 import org.apache.pinot.core.io.compression.ChunkCompressor;
 import org.apache.pinot.core.io.compression.ChunkCompressorFactory;
-import org.apache.pinot.core.io.writer.SingleColumnSingleValueWriter;
+import org.apache.pinot.core.io.writer.ForwardIndexWriter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * Abstract implementation for {@link SingleColumnSingleValueWriter}
- * Base class for fixed and variable byte writer implementations.
+ * Base implementation for chunk based single-value forward index writer.

Review comment:
       Consider adding "raw"  -- `Base implementation for chunk based 
single-value raw forward index writer.`

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/io/writer/impl/FixedBitSVForwardIndexWriter.java
##########
@@ -0,0 +1,59 @@
+/**
+ * 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.pinot.core.io.writer.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.ByteOrder;
+import org.apache.pinot.core.io.util.FixedBitIntReaderWriter;
+import org.apache.pinot.core.io.writer.ForwardIndexWriter;
+import org.apache.pinot.core.segment.memory.PinotDataBuffer;
+
+
+/**
+ * Bit-compressed dictionary-encoded forward index writer for single-value 
columns. The values written are dictionary
+ * ids.
+ */
+public class FixedBitSVForwardIndexWriter implements ForwardIndexWriter {

Review comment:
       Why not just change the name of existing file FixedBitSingleValueWriter 
and remove all the unsupported operations. ? You are already doing that for 
FixedBitMVForwardIndexWriter which was originally FixedBitMultiValueWriter




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to