Examples of TableFunctionEvaluator


Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

   */
  public static boolean addPTFMapOperator(QueryDef qdef) throws WindowingException
  {
    boolean hasMap = false;
    TableFuncDef tabDef = RuntimeUtils.getFirstTableFunction(qdef);
    TableFunctionEvaluator tEval = tabDef.getFunction();
    if (tEval.isTransformsRawInput())
    {
      hasMap = true;
    }
    return hasMap;

View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

    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
    {
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

        tDef.addArg(argDef);
      }
    }
   
    tFn.initialize(qDef, tDef);
    TableFunctionEvaluator tEval = tFn.getEvaluator();   
    tDef.setFunction(tEval);
    tFn.setupRawInputOI();
    tDef.setWindow(WindowSpecTranslation.translateWindow(qDef, tDef));
    tFn.setupOutputOI();
    TranslateUtils.setupSerdeAndOI(tDef, inputDef, tInfo, tEval);
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

    inputInfoMap.put(input.getAlias(), new InputInfo(this, input, null));
  }
 
  public InputInfo getMapInputInfo(TableFuncDef tDef) throws WindowingException
  {
    TableFunctionEvaluator tFn = tDef.getFunction();
    if ( !tFn.isTransformsRawInput() )
    {
      return null;
    }
    mapReshapeInfoMap = mapReshapeInfoMap == null ? new HashMap<String, InputInfo>() : mapReshapeInfoMap;
    InputInfo ii = mapReshapeInfoMap.get(tDef.getAlias());
    if ( ii == null )
    {
      ii = new InputInfo(this, tDef, tFn.getRawInputOI());
      mapReshapeInfoMap.put(tDef.getAlias(), ii);
    }
    return ii;
  }
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

   * (either HiveTableDef or HiveQueryDef) of the query.
   */
  @Override
  public void preVisit(TableFuncDef tblFuncDef) throws WindowingException
  {
    TableFunctionEvaluator tEval = tblFuncDef.getFunction();
    currentTFnResolver = FunctionRegistry.getTableFunctionResolver(tEval.getTableDef().getName());
    currentTFnResolver.initialize(qDef, tblFuncDef, tEval);
    if (tEval.isTransformsRawInput())
    {
      currentTFnResolver.setupRawInputOI();
      inputInfo = qDef.getTranslationInfo().getMapInputInfo(tblFuncDef);
    }
    else
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

   *    with this table function definition.
   */
  @Override
  public void visit(TableFuncDef tblFuncDef) throws WindowingException
  {
    TableFunctionEvaluator tEval = tblFuncDef.getFunction();
    currentTFnResolver.setupOutputOI();
    TranslateUtils.setupSerdeAndOI(tblFuncDef, qInDef, tInfo, tEval);
    tInfo.addInput(tblFuncDef);
    inputInfo = qDef.getTranslationInfo().getInputInfo(tblFuncDef);
  }
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

  {
    super();
    this.wIn = wIn;
    this.qDef = qDef;
    TableFuncDef tabDef = (TableFuncDef) qDef.getInput();
    TableFunctionEvaluator tEval = tabDef.getFunction();
    partClassName = tEval.getPartitionClass();
    partMemSize = tEval.getPartitionMemSize();
   
    serDe = (SerDe) wIn.getDeserializer();
    try
    {
      OI = (StructObjectInspector) serDe.getObjectInspector();
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

   */
  public static Partition createFirstPartitionForChain(QueryDef qDef, ObjectInspector oi,
      HiveConf hiveConf, boolean isMapSide) throws WindowingException
  {
    TableFuncDef tabDef = getFirstTableFunction(qDef);
    TableFunctionEvaluator tEval = tabDef.getFunction();
    String partClassName = tEval.getPartitionClass();
    int partMemSize = tEval.getPartitionMemSize();

    Partition part = null;
    SerDe serde = tabDef.getInput().getSerde();
    part = new Partition(partClassName, partMemSize, serde,
        (StructObjectInspector) oi);
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.TableFunctionEvaluator

    {
      return null;
    }
   
    String desc = getInputDescription(qDef, tFnDef);
    TableFunctionEvaluator tFn = tFnDef.getFunction();
    InputInfo iInfo = null;
    if ( tFn.isTransformsRawInput() )
    {
      iInfo = tInfo.getMapInputInfo(tFnDef);
    }
    else
    {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.udf.ptf.TableFunctionEvaluator

    wdwTFnDef.setResolverClassName(tFn.getClass().getName());
    wdwTFnDef.setAlias("ptf_" + 1);
    wdwTFnDef.setExpressionTreeString(null);
    wdwTFnDef.setTransformsRawInput(false);
    tFn.initialize(hCfg, ptfDesc, wdwTFnDef);
    TableFunctionEvaluator tEval = tFn.getEvaluator();
    wdwTFnDef.setTFunction(tEval);
    wdwTFnDef.setCarryForwardNames(tFn.carryForwardNames());
    wdwTFnDef.setRawInputShape(inpShape);

    PartitioningSpec partiSpec = wdwSpec.getQueryPartitioningSpec();
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.