Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2823#discussion_r227620816 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/scanner/LazyBlockletLoad.java --- @@ -0,0 +1,158 @@ +/* + * 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.carbondata.core.scan.scanner; + +import java.io.IOException; + +import org.apache.carbondata.core.datastore.FileReader; +import org.apache.carbondata.core.datastore.chunk.AbstractRawColumnChunk; +import org.apache.carbondata.core.datastore.chunk.impl.DimensionRawColumnChunk; +import org.apache.carbondata.core.datastore.chunk.impl.MeasureRawColumnChunk; +import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo; +import org.apache.carbondata.core.scan.processor.RawBlockletColumnChunks; +import org.apache.carbondata.core.stats.QueryStatistic; +import org.apache.carbondata.core.stats.QueryStatisticsConstants; +import org.apache.carbondata.core.stats.QueryStatisticsModel; + +/** + * Reads the blocklet column chunks lazily, it means it reads the column chunks from disk when + * execution engine wants to access it. + * It is useful in case of filter queries with high cardinality columns. + */ +public class LazyBlockletLoad { + + private RawBlockletColumnChunks rawBlockletColumnChunks; + + private BlockExecutionInfo blockExecutionInfo; + + private LazyChunkWrapper[] dimLazyWrapperChunks; + + private LazyChunkWrapper[] msrLazyWrapperChunks; --- End diff -- can we unify the processing of `dimLazyWrapperChunks` and `msrLazyWrapperChunks` so that we can use one flow for them?
---