Search in sources :

Example 6 with AlgebricksAppendable

use of org.apache.hyracks.algebricks.core.algebra.prettyprint.AlgebricksAppendable in project asterixdb by apache.

the class ResultPrinter method printPostfix.

private void printPostfix() throws HyracksDataException {
    output.out().flush();
    if (wrapArray) {
        output.out().println(" ]");
    }
    try {
        output.resultPostfix(new AlgebricksAppendable(output.out()));
    } catch (AlgebricksException e) {
        throw new HyracksDataException(e);
    }
    if (conf.is(SessionConfig.FORMAT_HTML)) {
        output.out().println("</pre>");
    }
    output.out().flush();
}
Also used : AlgebricksAppendable(org.apache.hyracks.algebricks.core.algebra.prettyprint.AlgebricksAppendable) AlgebricksException(org.apache.hyracks.algebricks.common.exceptions.AlgebricksException) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException)

Example 7 with AlgebricksAppendable

use of org.apache.hyracks.algebricks.core.algebra.prettyprint.AlgebricksAppendable in project asterixdb by apache.

the class AbstractRuleController method getPlanString.

private String getPlanString(Mutable<ILogicalOperator> opRef) throws AlgebricksException {
    if (AlgebricksConfig.ALGEBRICKS_LOGGER.isLoggable(Level.FINE) && context != null) {
        LogicalOperatorPrettyPrintVisitor pvisitor = context.getPrettyPrintVisitor();
        pvisitor.reset(new AlgebricksAppendable());
        PlanPrettyPrinter.printOperator((AbstractLogicalOperator) opRef.getValue(), pvisitor, 0);
        return pvisitor.get().toString();
    }
    return null;
}
Also used : AlgebricksAppendable(org.apache.hyracks.algebricks.core.algebra.prettyprint.AlgebricksAppendable) LogicalOperatorPrettyPrintVisitor(org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor)

Aggregations

AlgebricksAppendable (org.apache.hyracks.algebricks.core.algebra.prettyprint.AlgebricksAppendable)7 AlgebricksException (org.apache.hyracks.algebricks.common.exceptions.AlgebricksException)5 LogicalOperatorPrettyPrintVisitor (org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor)3 HyracksDataException (org.apache.hyracks.api.exceptions.HyracksDataException)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 IOException (java.io.IOException)1 StringWriter (java.io.StringWriter)1 ILangExpressionToPlanTranslator (org.apache.asterix.algebra.base.ILangExpressionToPlanTranslator)1 CompilerProperties (org.apache.asterix.common.config.CompilerProperties)1 MergeAggregationExpressionFactory (org.apache.asterix.dataflow.data.common.MergeAggregationExpressionFactory)1 PartialAggregationTypeComputer (org.apache.asterix.dataflow.data.common.PartialAggregationTypeComputer)1 IDataFormat (org.apache.asterix.formats.base.IDataFormat)1 JobEventListenerFactory (org.apache.asterix.runtime.job.listener.JobEventListenerFactory)1 Stats (org.apache.asterix.translator.IStatementExecutor.Stats)1 SessionConfig (org.apache.asterix.translator.SessionConfig)1 AlgebricksAbsolutePartitionConstraint (org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint)1 AlgebricksPartitionConstraint (org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint)1 HeuristicCompilerFactoryBuilder (org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder)1 ICompiler (org.apache.hyracks.algebricks.compiler.api.ICompiler)1 ICompilerFactory (org.apache.hyracks.algebricks.compiler.api.ICompilerFactory)1