Example #1
0
 private PhysicalPlan convert(final LogicalPlan plan) throws OptimizerException {
   if (logger.isDebugEnabled()) {
     logger.debug(
         "Converting logical plan {}.", plan.toJsonStringSafe(queryContext.getLpPersistence()));
   }
   return new BasicOptimizer(queryContext, initiatingClient)
       .optimize(new BasicOptimizer.BasicOptimizationContext(queryContext), plan);
 }
Example #2
0
 private void log(final PhysicalPlan plan) {
   if (logger.isDebugEnabled()) {
     try {
       final String planText =
           queryContext.getLpPersistence().getMapper().writeValueAsString(plan);
       logger.debug("Physical {}", planText);
     } catch (final IOException e) {
       logger.warn("Error while attempting to log physical plan.", e);
     }
   }
 }
Example #3
0
 private void returnPhysical(final PhysicalPlan plan) throws ExecutionSetupException {
   final String jsonPlan = plan.unparse(queryContext.getLpPersistence().getMapper().writer());
   runPhysicalPlan(
       DirectPlan.createDirectPlan(queryContext, new PhysicalFromLogicalExplain(jsonPlan)));
 }
Example #4
0
 private void log(final LogicalPlan plan) {
   if (logger.isDebugEnabled()) {
     logger.debug("Logical {}", plan.unparse(queryContext.getLpPersistence()));
   }
 }