npawar commented on a change in pull request #4798: Decouple Key from Record
URL: https://github.com/apache/incubator-pinot/pull/4798#discussion_r343880112
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/table/BaseTable.java
 ##########
 @@ -0,0 +1,94 @@
+/**
+ * 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.data.table;
+
+import java.util.Iterator;
+import java.util.List;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.pinot.common.request.AggregationInfo;
+import org.apache.pinot.common.request.SelectionSort;
+import org.apache.pinot.common.utils.DataSchema;
+import org.apache.pinot.core.query.aggregation.function.AggregationFunction;
+import 
org.apache.pinot.core.query.aggregation.function.AggregationFunctionUtils;
+
+
+/**
+ * Base abstract implementation of Table
+ */
+public abstract class BaseTable implements Table {
+
+  final AggregationFunction[] _aggregationFunctions;
+  final int _numAggregations;
+  final DataSchema _dataSchema;
+  final int _numColumns;
+
+  // the capacity we need to trim to
+  final int _capacity;
+  // the capacity with added buffer, in order to collect more records than 
capacity for better precision
+  final int _maxCapacity;
+
+  final boolean _isOrderBy;
+  final TableResizer _tableResizer;
+
+  /**
+   * Initializes the variables and comparators needed for the table
+   */
+  BaseTable(DataSchema dataSchema, List<AggregationInfo> aggregationInfos, 
List<SelectionSort> orderBy, int capacity) {
 
 Review comment:
   Yes, that's right. We discussed on similar lines in this comment: 
https://github.com/apache/incubator-pinot/pull/4798#discussion_r343405515
   This revisit and cleanup can be done as soon as we get another 
implementation for the table i.e. in the Distinct PR

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to