amrishlal commented on a change in pull request #6710:
URL: https://github.com/apache/incubator-pinot/pull/6710#discussion_r605325603



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableImplV3.java
##########
@@ -0,0 +1,399 @@
+/**
+ * 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.common.datatable;
+
+import com.google.common.primitives.Ints;
+import com.google.common.primitives.Longs;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.pinot.common.response.ProcessingException;
+import org.apache.pinot.common.utils.DataSchema;
+import org.apache.pinot.common.utils.StringUtil;
+import org.apache.pinot.core.query.request.context.ThreadTimer;
+
+import static 
org.apache.pinot.common.utils.DataTable.MetadataKey.THREAD_CPU_TIME_NS;
+import static 
org.apache.pinot.core.common.datatable.DataTableBuilder.VERSION_3;
+import static org.apache.pinot.core.common.datatable.DataTableUtils.decodeInt;
+import static org.apache.pinot.core.common.datatable.DataTableUtils.decodeLong;
+import static 
org.apache.pinot.core.common.datatable.DataTableUtils.decodeString;
+
+
+/**
+ * Datatable V3 implementation.
+ * The layout of serialized V3 datatable looks like:
+ *     +-----------------------------------------------+
+ *     | 13 integers of header:                        |
+ *     | VERSION                                       |
+ *     | NUM_ROWS                                      |
+ *     | NUM_COLUMNS                                   |
+ *     | EXCEPTIONS SECTION START OFFSET               |
+ *     | EXCEPTIONS SECTION LENGTH                     |
+ *     | DICTIONARY_MAP SECTION START OFFSET           |
+ *     | DICTIONARY_MAP SECTION LENGTH                 |
+ *     | DATA_SCHEMA SECTION START OFFSET              |
+ *     | DATA_SCHEMA SECTION LENGTH                    |
+ *     | FIXED_SIZE_DATA SECTION START OFFSET          |
+ *     | FIXED_SIZE_DATA SECTION LENGTH                |
+ *     | VARIABLE_SIZE_DATA SECTION START OFFSET       |
+ *     | VARIABLE_SIZE_DATA SECTION LENGTH             |
+ *     +-----------------------------------------------+
+ *     | EXCEPTIONS SECTION                            |
+ *     +-----------------------------------------------+
+ *     | DICTIONARY_MAP SECTION                        |
+ *     +-----------------------------------------------+
+ *     | DATA_SCHEMA SECTION                           |
+ *     +-----------------------------------------------+
+ *     | FIXED_SIZE_DATA SECTION                       |
+ *     +-----------------------------------------------+
+ *     | VARIABLE_SIZE_DATA SECTION                    |
+ *     +-----------------------------------------------+
+ *     | METADATA LENGTH                               |
+ *     | METADATA SECTION                              |
+ *     +-----------------------------------------------+
+ */
+public class DataTableImplV3 extends BaseDataTable {
+  private static final int HEADER_SIZE = Integer.BYTES * 13;
+  // _errCodeToExceptionMap stores exceptions as a map of 
errorCode->errorMessage
+  private final Map<Integer, String> _errCodeToExceptionMap;
+
+  /**
+   * Construct data table with results. (Server side)
+   */
+  public DataTableImplV3(int numRows, DataSchema dataSchema, Map<String, 
Map<Integer, String>> dictionaryMap,
+      byte[] fixedSizeDataBytes, byte[] variableSizeDataBytes) {
+    super(numRows, dataSchema, dictionaryMap, fixedSizeDataBytes, 
variableSizeDataBytes);
+    _errCodeToExceptionMap = new HashMap<>();
+  }
+
+  /**
+   * Construct empty data table. (Server side)
+   */
+  public DataTableImplV3() {
+    super();

Review comment:
       call to super() is redundant.




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