Package org.apache.tajo.datum

Examples of org.apache.tajo.datum.Datum.type()


  @Override
  public void eval(EvalContext ctx, Schema schema, Tuple tuple) {
    IsNullEvalCtx isNullCtx = (IsNullEvalCtx) ctx;
    leftExpr.eval(isNullCtx.predicandContext, schema, tuple);
    Datum result = leftExpr.terminate(((IsNullEvalCtx)ctx).predicandContext);
    ((IsNullEvalCtx) ctx).result = DatumFactory.createBool(isNot ^ (result.type() == TajoDataTypes.Type.NULL));
  }

  @Override
  public Datum terminate(EvalContext ctx) {
    return ((IsNullEvalCtx)ctx).result;
View Full Code Here


      return lhs.divide(rhs);
    case MODULAR:
      return lhs.modular(rhs);

    case CONCATENATE:
      if (lhs.type() == Type.NULL_TYPE || rhs.type() == Type.NULL_TYPE) {
        return NullDatum.get();
      }
      return DatumFactory.createText(lhs.asChars() + rhs.asChars());
    default:
      throw new InvalidEvalException("We does not support " + type + " expression yet");
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.