code: private Pair<DataSource, Optional<BooleanExpression>> optimizeDataSource(
              DataSource originalDataSource,
              List<BooleanExpression> originalWhereConditions,
              Map<String, Object> selectionMap,
              Map<String, String> tableAliases
      ) {
  
          OptimizationContext optimizationContext = analyzeOriginalData(originalDataSource, originalWhereConditions, tableAliases);
  
          DataSource optimizedDataSource = createOptimizedDataSource(originalDataSource, optimizationContext, selectionMap, tableAliases);
  
          Optional<BooleanExpression> optimizedWhereCondition = createOptimizedWhereCondition(optimizationContext);
  
          return new Pair<>(optimizedDataSource, optimizedWhereCondition);
      }
docs: Deciding whether parts of where clause can be moved to data sources