Package org.apache.hadoop.hive.ql.plan

Examples of org.apache.hadoop.hive.ql.plan.exprNodeFieldDesc


      return false;
    } else if (desc instanceof exprNodeIndexDesc) {
      exprNodeIndexDesc d = (exprNodeIndexDesc)desc;
      return mightBeUnknown(d.getDesc()) || mightBeUnknown(d.getIndex());
    } else if (desc instanceof exprNodeFieldDesc) {
      exprNodeFieldDesc d = (exprNodeFieldDesc)desc;
      return mightBeUnknown(d.getDesc());
    } else if (desc instanceof exprNodeFuncDesc) {
      exprNodeFuncDesc d = (exprNodeFuncDesc)desc;
      for(int i=0; i<d.getChildren().size(); i++) {
        if (mightBeUnknown(d.getChildren().get(i))) {
          return true;
        }
      }
      return false;
    } else if (desc instanceof exprNodeColumnDesc) {
View Full Code Here


        TypeInfo t = ((StructTypeInfo)objectTypeInfo).getStructFieldTypeInfo(fieldNameString);
        if (isList) {
          t = TypeInfoFactory.getListTypeInfo(t);
        }
       
        desc = new exprNodeFieldDesc(t, children.get(0), fieldNameString, isList);
       
      } else if (funcText.equals("[")){
        // "[]" : LSQUARE/INDEX Expression
        assert(children.size() == 2);
       
View Full Code Here

    @Override
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
        Object... nodeOutputs) throws SemanticException {
      ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx;
      String alias = null;
      exprNodeFieldDesc expr = (exprNodeFieldDesc) nd;

      boolean isCandidate = true;
      assert(nd.getChildren().size() == 1);
      exprNodeDesc ch = (exprNodeDesc) nd.getChildren().get(0);
      exprNodeDesc newCh = ctx.getConvertedNode(ch);
      if (newCh != null) {
        expr.setDesc(newCh);
        ch = newCh;
      }
      String chAlias = ctx.getAlias(ch);

      isCandidate = isCandidate && ctx.isCandidate(ch);
View Full Code Here

    @Override
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
        Object... nodeOutputs) throws SemanticException {
     
      exprNodeFieldDesc fnd = (exprNodeFieldDesc)nd;
      boolean unknown = false;
      int idx = 0;
      exprNodeDesc left_nd = null;
      for(Object child: nodeOutputs) {
        exprNodeDesc child_nd = (exprNodeDesc) child;
        if (child_nd instanceof exprNodeConstantDesc &&
            ((exprNodeConstantDesc)child_nd).getValue() == null)
          unknown = true;
        left_nd = child_nd;
      }

      assert(idx == 0);

      exprNodeDesc newnd = null;
      if (unknown) {
        newnd = new exprNodeConstantDesc(fnd.getTypeInfo(), null);
      }
      else {
        newnd = new exprNodeFieldDesc(fnd.getTypeInfo(), left_nd, fnd.getFieldName(), fnd.getIsList());
      }
      return newnd;
    }
View Full Code Here

    Operator<selectDesc> op5 =  OperatorFactory.get
      (new selectDesc
       (Utilities.makeList
        (getStringColumn(Utilities.ReduceField.ALIAS.toString()),
         new exprNodeFieldDesc(TypeInfoFactory.stringTypeInfo,
             new exprNodeColumnDesc(TypeInfoFactory.getListTypeInfo(
                 TypeInfoFactory.stringTypeInfo),
                 Utilities.ReduceField.VALUE.toString(), "", false),
             "0",
             false)), outputColumns), op4);
View Full Code Here

    Operator<selectDesc> op5 =  OperatorFactory.get
      (new selectDesc
       (Utilities.makeList
        (getStringColumn(Utilities.ReduceField.ALIAS.toString()),
         new exprNodeFieldDesc(TypeInfoFactory.stringTypeInfo,
             new exprNodeColumnDesc(TypeInfoFactory.getListTypeInfo(
                 TypeInfoFactory.stringTypeInfo),
                 Utilities.ReduceField.VALUE.toString(), "", false),
             "0",
             false)), outputColumns), op4);
View Full Code Here

    @Override
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
        Object... nodeOutputs) throws SemanticException {
     
      exprNodeFieldDesc fnd = (exprNodeFieldDesc)nd;
      boolean unknown = false;
      int idx = 0;
      exprNodeDesc left_nd = null;
      for(Object child: nodeOutputs) {
        exprNodeDesc child_nd = (exprNodeDesc) child;
        if (child_nd instanceof exprNodeConstantDesc &&
            ((exprNodeConstantDesc)child_nd).getValue() == null)
          unknown = true;
        left_nd = child_nd;
      }

      assert(idx == 0);

      exprNodeDesc newnd = null;
      if (unknown) {
        newnd = new exprNodeConstantDesc(fnd.getTypeInfo(), null);
      }
      else {
        newnd = new exprNodeFieldDesc(fnd.getTypeInfo(), left_nd, fnd.getFieldName(), fnd.getIsList());
      }
      return newnd;
    }
View Full Code Here

        TypeInfo t = ((StructTypeInfo)objectTypeInfo).getStructFieldTypeInfo(fieldNameString);
        if (isList) {
          t = TypeInfoFactory.getListTypeInfo(t);
        }
       
        desc = new exprNodeFieldDesc(t, children.get(0), fieldNameString, isList);
       
      } else if (funcText.equals("[")){
        // "[]" : LSQUARE/INDEX Expression
        assert(children.size() == 2);
       
View Full Code Here

    @Override
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
        Object... nodeOutputs) throws SemanticException {
      ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx;
      String alias = null;
      exprNodeFieldDesc expr = (exprNodeFieldDesc) nd;

      boolean isCandidate = true;
      assert(nd.getChildren().size() == 1);
      exprNodeDesc ch = (exprNodeDesc) nd.getChildren().get(0);
      exprNodeDesc newCh = ctx.getConvertedNode(ch);
      if (newCh != null) {
        expr.setDesc(newCh);
        ch = newCh;
      }
      String chAlias = ctx.getAlias(ch);

      isCandidate = isCandidate && ctx.isCandidate(ch);
View Full Code Here

      exprNodeConstantDesc d = (exprNodeConstantDesc)desc;
      return d.getValue() == null;
    } else if (desc instanceof exprNodeNullDesc) {
      return false;
    } else if (desc instanceof exprNodeFieldDesc) {
      exprNodeFieldDesc d = (exprNodeFieldDesc)desc;
      return mightBeUnknown(d.getDesc());
    } else if (desc instanceof exprNodeFuncDesc) {
      exprNodeFuncDesc d = (exprNodeFuncDesc)desc;
      for(int i=0; i<d.getChildren().size(); i++) {
        if (mightBeUnknown(d.getChildExprs().get(i))) {
          return true;
        }
      }
      return false;
    } else if (desc instanceof exprNodeGenericFuncDesc) {
      exprNodeGenericFuncDesc d = (exprNodeGenericFuncDesc)desc;
      for(int i=0; i<d.getChildren().size(); i++) {
        if (mightBeUnknown(d.getChildExprs().get(i))) {
          return true;
        }
      }
      return false;
    } else if (desc instanceof exprNodeColumnDesc) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.plan.exprNodeFieldDesc

Copyright © 2018 www.massapicom. 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.