Package org.apache.tajo.datum

Examples of org.apache.tajo.datum.TextDatum


  public Datum eval(Tuple params) {
    Datum valueDatum = params.get(0);
    if (valueDatum instanceof NullDatum) {
      return NullDatum.get();
    }
    return new TextDatum(GeoIPUtil.getCountryCode(params.get(0).asChars()));
  }
View Full Code Here


    appender.init();
    Tuple tuple = new VTuple(schema.size());
    int writtenSize = 0;
    int count = 0;
    while (true) {
      TextDatum textDatum = DatumFactory.createText(count + "_" + contentsData);
      tuple.put(new Datum[] {
          DatumFactory.createInt4(count), textDatum });
      appender.addTuple(tuple);

      writtenSize += textDatum.size();
      if (writtenSize >= dataSize) {
        break;
      }
    }
View Full Code Here

    LogicalNode[] nodes = PlannerUtil.findAllNodes(node, NodeType.SCAN);
    Map<BinaryEval, Boolean> qualMap = TUtil.newHashMap();
    BinaryEval joinQual = new BinaryEval(EvalType.EQUAL
        , new FieldEval(new Column("default.n.n_name", Type.TEXT))
        , new ConstEval(new TextDatum("MOROCCO"))
    );
    qualMap.put(joinQual, Boolean.FALSE);

    for(LogicalNode eachNode : nodes) {
      ScanNode scanNode = (ScanNode)eachNode;
View Full Code Here

    optimizer.optimize(plan);

    LogicalNode[] nodes = PlannerUtil.findAllNodes(node, NodeType.SCAN);
    Map<BinaryEval, Boolean> qualMap = TUtil.newHashMap();
    TextDatum[] datums = new TextDatum[3];
    datums[0] = new TextDatum("ARGENTINA");
    datums[1] = new TextDatum("ETHIOPIA");
    datums[2] = new TextDatum("MOROCCO");

    BinaryEval joinQual = new BinaryEval(EvalType.EQUAL
        , new FieldEval(new Column("default.n.n_name", Type.TEXT))
        , new RowConstantEval(datums)
    );
View Full Code Here

    LogicalOptimizer optimizer = new LogicalOptimizer(util.getConfiguration());
    optimizer.optimize(plan);

    Map<BinaryEval, Boolean> scanMap = TUtil.newHashMap();
    TextDatum[] datums = new TextDatum[3];
    datums[0] = new TextDatum("ARGENTINA");
    datums[1] = new TextDatum("ETHIOPIA");
    datums[2] = new TextDatum("MOROCCO");

    BinaryEval scanQual = new BinaryEval(EvalType.EQUAL
        , new FieldEval(new Column("default.n.n_name", Type.TEXT))
        , new RowConstantEval(datums)
    );
View Full Code Here

TOP

Related Classes of org.apache.tajo.datum.TextDatum

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.