Examples of InputInfo


Examples of com.sap.hadoop.windowing.query2.translate.QueryTranslationInfo.InputInfo

  public void initialize() throws WindowingException
  {

    TableFuncDef tabDef = RuntimeUtils.getFirstTableFunction(qdef);
    hiveTableDef = tabDef.getHiveTableDef();
    InputInfo inputInfo;
    ArrayList<ColumnDef> partColList = tabDef.getWindow().getPartDef()
        .getColumns();

    TableFunctionEvaluator tEval = tabDef.getFunction();

    /*
     * If the query has a map phase, the inputInfo is retrieved from the map
     * output info of the table function definition. This is constructed
     * using the map output oi of the table function definition. If the
     * query does not have a map phase, the inputInfo is retrieved from the
     * QueryInputDef (either HiveTableDef or HiveQueryDef) of the query.
     */
    if (tEval.isTransformsRawInput())
    {
      inputInfo = qdef.getTranslationInfo().getMapInputInfo(tabDef);
    }
    else
    {
      inputInfo = qdef.getTranslationInfo().getInputInfo(hiveTableDef);
    }

    for (ColumnDef colDef : partColList)
    {
      partCols.add(colDef.getExprNode());
    }

    ArrayList<OrderColumnDef> orderColList = tabDef.getWindow()
        .getOrderDef().getColumns();

    for (OrderColumnDef colDef : orderColList)
    {
      Order order = colDef.getOrder();
      if (order.name().equals("ASC"))
      {
        orderString.append('+');
      }
      else
      {
        orderString.append('-');
      }

      orderCols.add(colDef.getExprNode());
      outputColumnNames.add(colDef.getAlias());
    }

    RowResolver rr = inputInfo.getRowResolver();
    ArrayList<ColumnInfo> colInfoList = rr.getColumnInfos();
    for (ColumnInfo colInfo : colInfoList)
    {
      String internalName = colInfo.getInternalName();
      TypeInfo type = colInfo.getType();
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.translate.QueryTranslationInfo.InputInfo

    }
   
    TableFuncDef tDef = new TableFuncDef();
    tDef.setSpec(tSpec);
    tDef.setInput(inputDef);
    InputInfo iInfo = tInfo.getInputInfo(inputDef);
   
    /*
     * translate args
     */
    ArrayList<ASTNode> args = tSpec.getArgs();
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.