Jackie-Jiang commented on a change in pull request #8140:
URL: https://github.com/apache/pinot/pull/8140#discussion_r800992938
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/common/DataBlockCache.java
##########
@@ -462,28 +452,15 @@ public void fillValues(String column, TransformEvaluator
evaluator, String[][] b
return numValues;
}
- /**
- * Helper class to store pair of column name and data type.
- */
- private static class ColumnTypePair {
- final String _column;
- final FieldSpec.DataType _dataType;
-
- ColumnTypePair(@Nonnull String column, @Nonnull FieldSpec.DataType
dataType) {
- _column = column;
- _dataType = dataType;
- }
+ private boolean markLoaded(FieldSpec.DataType dataType, String column) {
+ return _columnValueLoaded.computeIfAbsent(dataType, k -> new
HashSet<>()).add(column);
+ }
- @Override
- public int hashCode() {
- return EqualityUtils.hashCodeOf(_column.hashCode(),
_dataType.hashCode());
- }
+ private <T> T getValues(@Nonnull FieldSpec.DataType dataType, @Nonnull
String column) {
Review comment:
(minor) We don't usually annotate `Nonnull` but only annotate `Nullable`
and assume all un-annotated parameters are non-null
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/common/DataBlockCache.java
##########
@@ -67,7 +67,9 @@ public void initNewBlock(int[] docIds, int length) {
_length = length;
_columnDictIdLoaded.clear();
- _columnValueLoaded.clear();
+ for (Set<String> column : _columnValueLoaded.values()) {
Review comment:
(minor)
```suggestion
for (Set<String> columns : _columnValueLoaded.values()) {
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]