npawar commented on a change in pull request #4798: Decouple Key from Record
URL: https://github.com/apache/incubator-pinot/pull/4798#discussion_r343817724
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/data/table/ConcurrentIndexedTable.java
##########
@@ -68,17 +68,17 @@ public ConcurrentIndexedTable(DataSchema dataSchema,
List<AggregationInfo> aggre
* Thread safe implementation of upsert for inserting {@link Record} into
{@link Table}
*/
@Override
- public boolean upsert(Record newRecord) {
+ public boolean upsert(Key key, Record newRecord) {
- Key key = newRecord.getKey();
Preconditions.checkNotNull(key, "Cannot upsert record with null keys");
if (_noMoreNewRecords.get()) { // allow only existing record updates
_lookupMap.computeIfPresent(key, (k, v) -> {
Object[] existingValues = v.getValues();
Object[] newValues = newRecord.getValues();
- for (int i = 0; i < _numAggregations; i++) {
- existingValues[i] =
_aggregationFunctions[i].merge(existingValues[i], newValues[i]);
+ int aggNum =0;
Review comment:
i think it appears so because of the deleted lines.
I reformatted to check.
----------------------------------------------------------------
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]