class JdbcAnalyticsManager implements AnalyticsManager {

    @Override
    @Async
    public Future<Map<String, Object>> getAggregatedDataValues( DataQueryParams params, AnalyticsTableType tableType, int maxLimit )
    {
        assertQuery( params );

        try
        {
            ListMap<DimensionalItemObject, DimensionalItemObject> dataPeriodAggregationPeriodMap =
                params.getDataPeriodAggregationPeriodMap();

            if ( params.isDisaggregation() && params.hasDataPeriodType() )
            {
                params = DataQueryParams.newBuilder( params )
                    .withDataPeriodsForAggregationPeriods( dataPeriodAggregationPeriodMap )
                    .build();

                params = queryPlanner.assignPartitionsFromQueryPeriods( params, tableType );
            }

            String sql = getSelectClause( params );

            sql += getFromClause( params );

            sql += getWhereClause( params, tableType );

            sql += getGroupByClause( params );

            if ( params.hasMeasureCriteria() && params.isDataType( DataType.NUMERIC ) )
            {
                sql += getMeasureCriteriaSql( params );
            }

            log.debug( sql );

            Map<String, Object> map;

            try
            {
                map = getKeyValueMap( params, sql, maxLimit );
            }
            catch ( BadSqlGrammarException ex )
            {
                log.info( AnalyticsUtils.ERR_MSG_TABLE_NOT_EXISTING, ex );
                return new AsyncResult<>( Maps.newHashMap() );
            }

            replaceDataPeriodsWithAggregationPeriods( map, params, dataPeriodAggregationPeriodMap );

            return new AsyncResult<>( map );
        }
        catch ( DataAccessResourceFailureException ex )
        {
            log.warn( ErrorCode.E7131.getMessage(), ex );
            throw new QueryRuntimeException( ErrorCode.E7131, ex );
        }
        catch ( RuntimeException ex )
        {
            log.error( DebugUtils.getStackTrace( ex ) );
            throw ex;
        }
    }

    public  JdbcAnalyticsManager( QueryPlanner queryPlanner, @Qualifier( "readOnlyJdbcTemplate" ) JdbcTemplate jdbcTemplate );

}