Package org.apache.tajo.catalog

Examples of org.apache.tajo.catalog.Column


    stat.setAvgRows(80000);
       
    int numCols = 3;
    ColumnStat[] cols = new ColumnStat[numCols];
    for (int i = 0; i < numCols; i++) {
      cols[i] = new ColumnStat(new Column("col_" + i, Type.INT8));
      cols[i].setNumDistVals(1024 * i);
      cols[i].setNumNulls(100 * i);
      stat.addColumnStat(cols[i]);
    }
   
View Full Code Here


    numDistVals = 0l;
    numNulls = 0l;
  }

  public ColumnStat(ColumnStatProto proto) {
    this.column = new Column(proto.getColumn());

    if (proto.hasNumDistVal()) {
      this.numDistVals = proto.getNumDistVal();
    }
    if (proto.hasNumNulls()) {
View Full Code Here

)
public class SumLongDistinct extends AggFunction<Datum> {

  public SumLongDistinct() {
    super(new Column[] {
        new Column("expr", Type.INT8)
    });
  }
View Full Code Here

)
public final class CountValueDistinct extends CountRows {

  public CountValueDistinct() {
    super(new Column[] {
        new Column("expr", Type.ANY)
    });
  }
View Full Code Here

public class RTrim extends GeneralFunction {
  @Expose private boolean hasTrimCharacters;

  public RTrim() {
    super(new Column[] {
        new Column("text", TajoDataTypes.Type.TEXT),
    });
  }
View Full Code Here

  paramTypes = {@ParamTypes(paramTypes = {TajoDataTypes.Type.TEXT})}
)
public class BitLength extends GeneralFunction {
  public BitLength() {
    super(new Column[] {
        new Column("string", TajoDataTypes.Type.TEXT)
    });
  }
View Full Code Here

public class Rpad extends GeneralFunction {
  @Expose private boolean hasFillCharacters;

  public Rpad() {
    super(new Column[] {
        new Column("string", TajoDataTypes.Type.TEXT),
        new Column("length", TajoDataTypes.Type.INT4),
        new Column("fill_text", TajoDataTypes.Type.TEXT)
    });
  }
View Full Code Here

  }

  @Override
  public EvalNode visitColumnReference(Context ctx, Stack<Expr> stack, ColumnReferenceExpr expr)
      throws PlanningException {
    Column column = ctx.plan.resolveColumn(ctx.currentBlock, expr);
    return new FieldEval(column);
  }
View Full Code Here

    keyNum = this.plan.getPartitionMethod().getExpressionSchema().size();

    keyIds = new int[keyNum];
    keyNames = new String[keyNum];
    for (int i = 0; i < keyNum; i++) {
      Column column = this.plan.getPartitionMethod().getExpressionSchema().getColumn(i);
      keyNames[i] = column.getSimpleName();

      if (this.plan.getType() == NodeType.INSERT) {
        InsertNode insertNode = ((InsertNode)plan);
        int idx = insertNode.getTableSchema().getColumnId(column.getQualifiedName());
        keyIds[i] = idx;
      } else if (this.plan.getType() == NodeType.CREATE_TABLE) {
        CreateTableNode createTable = (CreateTableNode) plan;
        int idx = createTable.getLogicalSchema().getColumnId(column.getQualifiedName());
        keyIds[i] = idx;
      } else {
        // We can get partition column from a logical schema.
        // Don't use output schema because it is rewritten.
        keyIds[i] = plan.getOutSchema().getColumnId(column.getQualifiedName());
      }
    }
  }
View Full Code Here

    evalSchema = plan.getOutSchema();

    final Column [] keyColumns = plan.getGroupingColumns();
    groupingKeyNum = keyColumns.length;
    groupingKeyIds = new int[groupingKeyNum];
    Column col;
    for (int idx = 0; idx < plan.getGroupingColumns().length; idx++) {
      col = keyColumns[idx];
      groupingKeyIds[idx] = inSchema.getColumnId(col.getQualifiedName());
    }

    if (plan.hasAggFunctions()) {
      aggFunctions = plan.getAggFunctions();
      aggFunctionsNum = aggFunctions.length;
View Full Code Here

TOP

Related Classes of org.apache.tajo.catalog.Column

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.