Examples of evaluate()


Examples of org.apache.hadoop.hive.ql.exec.vector.udf.VectorUDFAdaptor.evaluate()

      // We should never get here.
      assertTrue(false);
    }

    VectorizedRowBatch b = getBatchLongInLongOut();
    vudf.evaluate(b);

    // verify output
    LongColumnVector out = (LongColumnVector) b.cols[1];
    assertEquals(1000, out.vector[0]);
    assertEquals(1001, out.vector[1]);

Examples of org.apache.hadoop.hive.ql.udf.UDFDayOfMonth.evaluate()

  }

  private void compareToUDFDayOfMonthDate(long t, int y) {
    UDFDayOfMonth udf = new UDFDayOfMonth();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFDayOfMonth(VectorizedRowBatch batch) {
    VectorExpression udf = null;

Examples of org.apache.hadoop.hive.ql.udf.UDFHour.evaluate()

  }

  private void compareToUDFHourLong(long t, int y) {
    UDFHour udf = new UDFHour();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFHour(VectorizedRowBatch batch, TestType testType) {
    VectorExpression udf = null;

Examples of org.apache.hadoop.hive.ql.udf.UDFMinute.evaluate()

  }

  private void compareToUDFMinuteLong(long t, int y) {
    UDFMinute udf = new UDFMinute();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFMinute(VectorizedRowBatch batch, TestType testType) {
    VectorExpression udf = null;

Examples of org.apache.hadoop.hive.ql.udf.UDFMonth.evaluate()

  }

  private void compareToUDFMonthDate(long t, int y) {
    UDFMonth udf = new UDFMonth();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFMonth(VectorizedRowBatch batch) {
    VectorExpression udf;

Examples of org.apache.hadoop.hive.ql.udf.UDFSecond.evaluate()

  }

  private void compareToUDFSecondLong(long t, int y) {
    UDFSecond udf = new UDFSecond();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFSecond(VectorizedRowBatch batch, TestType testType) {
    VectorExpression udf;

Examples of org.apache.hadoop.hive.ql.udf.UDFWeekOfYear.evaluate()

  }

  private void compareToUDFWeekOfYearDate(long t, int y) {
    UDFWeekOfYear udf = new UDFWeekOfYear();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFWeekOfYear(VectorizedRowBatch batch) {
    VectorExpression udf;

Examples of org.apache.hadoop.hive.ql.udf.UDFYear.evaluate()

  }

  private void compareToUDFYearDate(long t, int y) {
    UDFYear udf = new UDFYear();
    TimestampWritable tsw = toTimestampWritable(t);
    IntWritable res = udf.evaluate(tsw);
    Assert.assertEquals(res.get(), y);
  }

  private void verifyUDFYear(VectorizedRowBatch batch) {
    VectorExpression udf = null;

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.evaluate()

            {
              args[i++] = arg.getExprEvaluator().evaluate(row);
            }
            fEval.aggregate(aggBuffer, args);
          }
          Object out = fEval.evaluate(aggBuffer);
          WindowFunctionInfo wFnInfo = FunctionRegistry.getWindowFunctionInfo(wFn.getSpec().getName());
          if ( !wFnInfo.isPivotResult())
          {
            out = new SameList(iPart.size(), out);
          }

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDFAbs.evaluate()

    ObjectInspector[] arguments = {valueOI};

    udf.initialize(arguments);
    DeferredObject valueObj = new DeferredJavaObject(new IntWritable(107));
    DeferredObject[] args = {valueObj};
    IntWritable output = (IntWritable) udf.evaluate(args);

    assertEquals("abs() test for INT failed ", 107, output.get());

    valueObj = new DeferredJavaObject(new IntWritable(-107));
    args[0] = valueObj;
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.