This is an automated email from the ASF dual-hosted git repository.
snlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new a314d42 Initialize _aggregateMetric in constructor (#5472)
a314d42 is described below
commit a314d42e8744549e5c182383445f11c60ac4ae4a
Author: Sidd <[email protected]>
AuthorDate: Sun May 31 15:35:46 2020 -0700
Initialize _aggregateMetric in constructor (#5472)
Co-authored-by: Siddharth Teotia <[email protected]>
---
.../apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
b/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
index 0e24664..b3a2fed 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
@@ -171,6 +171,7 @@ public class MutableSegmentImpl implements MutableSegment {
_partitionFunction = config.getPartitionFunction();
_partitionId = config.getPartitionId();
_nullHandlingEnabled = config.isNullHandlingEnabled();
+ _aggregateMetrics = config.aggregateMetrics();
Collection<FieldSpec> allFieldSpecs = _schema.getAllFieldSpecs();
List<FieldSpec> physicalFieldSpecs = new ArrayList<>(allFieldSpecs.size());
@@ -344,7 +345,8 @@ public class MutableSegmentImpl implements MutableSegment {
// if the column is part of noDictionary set from table config
if (fieldSpec instanceof DimensionFieldSpec && _aggregateMetrics &&
(dataType == FieldSpec.DataType.STRING ||
dataType == FieldSpec.DataType.BYTES)) {
- _logger.info("Not creating dictionary in consuming segment for column
{} of type {}", column, dataType.toString());
+ _logger.info("Aggregate metrics is enabled. Will create dictionary in
consuming segment for column {} of type {}",
+ column, dataType.toString());
return false;
}
// So don't create dictionary if the column is member of noDictionary,
is single-value
@@ -857,7 +859,6 @@ public class MutableSegmentImpl implements MutableSegment {
*/
private IdMap<FixedIntArray>
enableMetricsAggregationIfPossible(RealtimeSegmentConfig config,
Set<String> noDictionaryColumns) {
- _aggregateMetrics = config.aggregateMetrics();
if (!_aggregateMetrics) {
_logger.info("Metrics aggregation is disabled.");
return null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]