Examples of SelectOperator


Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

            case LEFTOUTERJOIN:
                AbstractBinaryJoinOperator abjo = (AbstractBinaryJoinOperator) op;
                result.add(abjo.getCondition());
                break;
            case SELECT:
                SelectOperator so = (SelectOperator) op;
                result.add(so.getCondition());
                break;
            case UNNEST:
            case UNNEST_MAP:
                AbstractUnnestOperator auo = (AbstractUnnestOperator) op;
                result.add(auo.getExpressionRef());
View Full Code Here

Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

        ILogicalExpression satExpr = sfce(BuiltinFunctions.FN_BOOLEAN_1,
                vre(translateExpression(qeNode.getSatisfiesExpr(), tCtx)));
        if (qeNode.getQuant() == QuantifierType.EVERY) {
            satExpr = sfce(BuiltinFunctions.FN_NOT_1, satExpr);
        }
        SelectOperator select = new SelectOperator(mutable(satExpr));
        select.getInputs().add(mutable(tCtx.op));
        tCtx.op = select;
        List<LogicalVariable> vars = new ArrayList<LogicalVariable>();
        List<Mutable<ILogicalExpression>> exprs = new ArrayList<Mutable<ILogicalExpression>>();
        LogicalVariable var = newLogicalVariable();
        vars.add(var);
View Full Code Here

Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

                }
                case WHERE_CLAUSE: {
                    WhereClauseNode wcNode = (WhereClauseNode) cNode;
                    ILogicalExpression condExpr = sfce(BuiltinFunctions.FN_BOOLEAN_1,
                            vre(translateExpression(wcNode.getCondition(), tCtx)));
                    SelectOperator select = new SelectOperator(mutable(condExpr));
                    select.getInputs().add(mutable(tCtx.op));
                    tCtx.op = select;
                    break;
                }
                case ORDERBY_CLAUSE: {
                    OrderbyClauseNode ocNode = (OrderbyClauseNode) cNode;
View Full Code Here

Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

                                SequenceType.create(BuiltinTypeRegistry.XSEXT_NUMERIC, Quantifier.QUANT_ONE));
                        ILogicalExpression posTest = sfce(BuiltinOperators.VALUE_EQ, vre(pLVar), vre(tCtx.varScope
                                .lookupVariable(XMLQueryCompilerConstants.POS_VAR_NAME).getLogicalVariable()));
                        ILogicalExpression boolTest = sfce(BuiltinFunctions.FN_BOOLEAN_1, vre(pLVar));

                        SelectOperator select = new SelectOperator(mutable(sfce(BuiltinOperators.IF_THEN_ELSE, tTest,
                                posTest, boolTest)));
                        select.getInputs().add(mutable(tCtx.op));
                        tCtx.op = select;
                        ctxExpr = vre(tCtx.varScope.lookupVariable(XMLQueryCompilerConstants.DOT_VAR_NAME)
                                .getLogicalVariable());
                        tCtx.popVariableScope();
                        tCtx = tCtx.popContext();
View Full Code Here

Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

        ILogicalExpression satExpr = sfce(BuiltinFunctions.FN_BOOLEAN_1,
                vre(translateExpression(qeNode.getSatisfiesExpr(), tCtx)));
        if (qeNode.getQuant() == QuantifierType.EVERY) {
            satExpr = sfce(BuiltinFunctions.FN_NOT_1, satExpr);
        }
        SelectOperator select = new SelectOperator(mutable(satExpr));
        select.getInputs().add(mutable(tCtx.op));
        tCtx.op = select;
        List<LogicalVariable> vars = new ArrayList<LogicalVariable>();
        List<Mutable<ILogicalExpression>> exprs = new ArrayList<Mutable<ILogicalExpression>>();
        LogicalVariable var = newLogicalVariable();
        vars.add(var);
View Full Code Here

Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

                }
                case WHERE_CLAUSE: {
                    WhereClauseNode wcNode = (WhereClauseNode) cNode;
                    ILogicalExpression condExpr = sfce(BuiltinFunctions.FN_BOOLEAN_1,
                            vre(translateExpression(wcNode.getCondition(), tCtx)));
                    SelectOperator select = new SelectOperator(mutable(condExpr));
                    select.getInputs().add(mutable(tCtx.op));
                    tCtx.op = select;
                    break;
                }
                case ORDERBY_CLAUSE: {
                    OrderbyClauseNode ocNode = (OrderbyClauseNode) cNode;
View Full Code Here

Examples of edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.SelectOperator

                                SequenceType.create(BuiltinTypeRegistry.XSEXT_NUMERIC, Quantifier.QUANT_ONE));
                        ILogicalExpression posTest = sfce(BuiltinOperators.VALUE_EQ, vre(pLVar), vre(tCtx.varScope
                                .lookupVariable(XMLQueryCompilerConstants.POS_VAR_NAME).getLogicalVariable()));
                        ILogicalExpression boolTest = sfce(BuiltinFunctions.FN_BOOLEAN_1, vre(pLVar));

                        SelectOperator select = new SelectOperator(mutable(sfce(BuiltinOperators.IF_THEN_ELSE, tTest,
                                posTest, boolTest)));
                        select.getInputs().add(mutable(tCtx.op));
                        tCtx.op = select;
                        ctxExpr = vre(tCtx.varScope.lookupVariable(XMLQueryCompilerConstants.DOT_VAR_NAME)
                                .getLogicalVariable());
                        tCtx.popVariableScope();
                        tCtx = tCtx.popContext();
View Full Code Here

Examples of operators.SelectOperator

    }

    @Override
    public Result execute() {
        Result inResult = getInputTerm().execute();
        SelectOperator oper = new SelectOperator(Utils.getCaf(), inResult.getResultRelation(), predicates);
        inResult.extend(oper);
        storeResult(inResult);
        return inResult;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.SelectOperator

  /**
   * The Node Processor for Column Pruning on Select Operators.
   */
  public static class ColumnPrunerSelectProc implements NodeProcessor {
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object... nodeOutputs) throws SemanticException {
      SelectOperator op = (SelectOperator)nd;
      ColumnPrunerProcCtx cppCtx = (ColumnPrunerProcCtx)ctx;
      List<String> cols = new ArrayList<String>();

      if(op.getChildOperators() != null) {
        for(Operator<? extends Serializable> child: op.getChildOperators()) {
          // If one of my children is a FileSink or Script, return all columns.
          // Without this break, a bug in ReduceSink to Extract edge column pruning will manifest
          // which should be fixed before remove this
          if ((child instanceof FileSinkOperator) || (child instanceof ScriptOperator)) {
            cppCtx.getPrunedColLists().put(op, cppCtx.getColsFromSelectExpr(op));
            return null;
          }
          cols = Utilities.mergeUniqElems(cols, cppCtx.getPrunedColLists().get(child));
        }
      }

      selectDesc conf = op.getConf();
      if (conf.isSelectStar() && !cols.isEmpty()) {
        // The input to the select does not matter. Go over the expressions
        // and return the ones which have a marked column
        cppCtx.getPrunedColLists().put(op, cppCtx.getSelectColsFromChildren(op, cols));
        return null;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.SelectOperator

      colExprMap.put(internalName, colDesc);
    }

    SelectDesc select = new SelectDesc(exprs, outputs, false);

    SelectOperator sel = (SelectOperator) putOpInsertMap(OperatorFactory.getAndMakeChild(select,
        new RowSchema(inputRR.getColumnInfos()), input), inputRR);

    sel.setColumnExprMap(colExprMap);

    // Insert the select operator in between.
    sel.setChildOperators(childOps);
    for (Operator<? extends OperatorDesc> ch : childOps) {
      ch.replaceParent(input, sel);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.