summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlzhang2012-01-10 21:49:08 (EST)
committer mwu2012-01-10 21:49:08 (EST)
commit4533073c5b63ade20e47b81b43e58d2c9a684d55 (patch)
treec3380ca46dd3fd5d4183907ba43a3401deed7b9a
parent0a6fc6b05d38b455b238a2befac21b5ce04fa2ca (diff)
downloadorg.eclipse.birt-4533073c5b63ade20e47b81b43e58d2c9a684d55.zip
org.eclipse.birt-4533073c5b63ade20e47b81b43e58d2c9a684d55.tar.gz
org.eclipse.birt-4533073c5b63ade20e47b81b43e58d2c9a684d55.tar.bz2
Checkin: Filter defined in BRS Table Builder is not pushed down to the
database [45775]
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedOdaDSQuery.java55
1 files changed, 20 insertions, 35 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedOdaDSQuery.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedOdaDSQuery.java
index b82732f..693f0bc 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedOdaDSQuery.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedOdaDSQuery.java
@@ -304,43 +304,28 @@ public class PreparedOdaDSQuery extends PreparedDataSourceQuery
if ( queryDefn.getQueryExecutionHints( ).enablePushDown( ) )
{
- int cacheSize = 0;
- if ( appContext.containsKey( DataEngine.MEMORY_DATA_SET_CACHE ) )
- {
- cacheSize = Integer.valueOf( appContext.get( DataEngine.MEMORY_DATA_SET_CACHE )
- .toString( ) )
- .intValue( );
- }
- if ( cacheSize <= 0
- && appContext.containsKey( DataEngine.DATA_SET_CACHE_ROW_LIMIT ) )
- {
- cacheSize = Integer.valueOf( appContext.get( DataEngine.DATA_SET_CACHE_ROW_LIMIT )
- .toString( ) )
- .intValue( );
- }
- if ( cacheSize <= 0 )
- {
- ValidationContext validationContext = ( (OdaDataSetRuntime) dataSet ).getValidationContext( );
+ ValidationContext validationContext = ( (OdaDataSetRuntime) dataSet ).getValidationContext();
- if ( validationContext != null )
+ if ( validationContext != null )
+ {
+ validationContext.setQueryText(((IOdaDataSetDesign) dataSetDesign).getQueryText());
+ OptimizationRollbackHelper rollbackHelper = new OptimizationRollbackHelper(
+ queryDefn, (IOdaDataSetDesign) dataSetDesign);
+ rollbackHelper.collectOriginalInfo();
+ querySpec = OdaQueryOptimizationUtil.optimizeExecution(
+ ((OdaDataSourceRuntime) dataEngine
+ .getDataSourceRuntime(dataSetDesign
+ .getDataSourceName()))
+ .getExtensionID(),
+ validationContext,
+ (IOdaDataSetDesign) dataSetDesign,
+ queryDefn, dataEngine.getSession(),
+ appContext, contextVisitor);
+ if ( querySpec == null )
{
- validationContext.setQueryText( ( (IOdaDataSetDesign) dataSetDesign ).getQueryText( ) );
- OptimizationRollbackHelper rollbackHelper = new OptimizationRollbackHelper(
- queryDefn, (IOdaDataSetDesign) dataSetDesign );
- rollbackHelper.collectOriginalInfo( );
- querySpec = OdaQueryOptimizationUtil.optimizeExecution( ( (OdaDataSourceRuntime) dataEngine.getDataSourceRuntime( dataSetDesign.getDataSourceName( ) ) ).getExtensionID( ),
- validationContext,
- (IOdaDataSetDesign) dataSetDesign,
- queryDefn,
- dataEngine.getSession( ),
- appContext,
- contextVisitor );
- if ( querySpec == null )
- {
- //roll back changes made in <code>dataSetDesign</code> and <code>queryDefn</code>
- rollbackHelper.rollback( );
- }
- }
+ //roll back changes made in <code>dataSetDesign</code> and <code>queryDefn</code>
+ rollbackHelper.rollback( );
+ }
}
}