Search in sources :

Example 6 with QueryExecutionException

use of org.apache.carbondata.core.scan.executor.exception.QueryExecutionException in project carbondata by apache.

the class VectorizedCarbonRecordReader method close.

@Override
public void close() throws IOException {
    logStatistics(rowCount, queryModel.getStatisticsRecorder());
    if (columnarBatch != null) {
        columnarBatch.close();
        columnarBatch = null;
    }
    // clear dictionary cache
    Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping();
    if (null != columnToDictionaryMapping) {
        for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) {
            CarbonUtil.clearDictionaryCache(entry.getValue());
        }
    }
    try {
        queryExecutor.finish();
    } catch (QueryExecutionException e) {
        throw new IOException(e);
    }
}
Also used : Dictionary(org.apache.carbondata.core.cache.dictionary.Dictionary) QueryExecutionException(org.apache.carbondata.core.scan.executor.exception.QueryExecutionException) IOException(java.io.IOException) Map(java.util.Map)

Aggregations

QueryExecutionException (org.apache.carbondata.core.scan.executor.exception.QueryExecutionException)6 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 TableBlockInfo (org.apache.carbondata.core.datastore.block.TableBlockInfo)3 ChunkRowIterator (org.apache.carbondata.core.scan.result.iterator.ChunkRowIterator)3 Map (java.util.Map)2 Dictionary (org.apache.carbondata.core.cache.dictionary.Dictionary)2 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 IndexKey (org.apache.carbondata.core.datastore.IndexKey)1 SegmentProperties (org.apache.carbondata.core.datastore.block.SegmentProperties)1 KeyGenException (org.apache.carbondata.core.keygenerator.KeyGenException)1 KeyGenerator (org.apache.carbondata.core.keygenerator.KeyGenerator)1 CarbonDimension (org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)1 CarbonMeasure (org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure)1 BlockExecutionInfo (org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo)1 QueryDimension (org.apache.carbondata.core.scan.model.QueryDimension)1 QueryMeasure (org.apache.carbondata.core.scan.model.QueryMeasure)1 BatchResult (org.apache.carbondata.core.scan.result.BatchResult)1 DateWritable (org.apache.hadoop.hive.serde2.io.DateWritable)1