Package org.apache.tajo.catalog

Examples of org.apache.tajo.catalog.Column


    }

    @Override
    public void addTuple(Tuple t) throws IOException {
      checkAndWriteSync();
      Column col;

      buffer.clear();
      nullFlags.clear();

      for (int i = 0; i < schema.getColumnNum(); i++) {
        if (enabledStats) {
          stats.analyzeField(i, t.get(i));
        }

        if (t.isNull(i)) {
          nullFlags.set(i);
        } else {
          col = schema.getColumn(i);
          switch (col.getDataType().getType()) {
            case BOOLEAN:
              buffer.put(t.getBoolean(i).asByte());
              break;
            case BIT:
              buffer.put(t.getByte(i).asByte());
              break;
            case CHAR:
              byte[] src = t.getChar(i).asByteArray();
              byte[] dst = Arrays.copyOf(src, col.getDataType().getLength());
              buffer.putInt(src.length);
              buffer.put(dst);
              break;
            case TEXT:
              byte [] strbytes = t.getText(i).asByteArray();
View Full Code Here


  private BooleanDatum result;
  protected Pattern compiled;

  public RegexpReplace() {
    super(new Column[] {
        new Column("text", TajoDataTypes.Type.TEXT),
        new Column("pattern", TajoDataTypes.Type.TEXT),
        new Column("replacement", TajoDataTypes.Type.INT4),
        new Column("flags", TajoDataTypes.Type.INT4), // it is not supported yet.
    });
  }
View Full Code Here

* text split_part(string text, delimiter text, field int)
*/
public class SplitPart extends GeneralFunction {
  public SplitPart() {
    super(new Column[] {
        new Column("text", TajoDataTypes.Type.TEXT),
        new Column("delimiter", TajoDataTypes.Type.TEXT),
        new Column("field", TajoDataTypes.Type.INT4),
    });
  }
View Full Code Here

* text upper(string text)
*/
public class Upper extends GeneralFunction {
  public Upper() {
    super(new Column[] {
        new Column("text", TajoDataTypes.Type.TEXT)
    });
  }
View Full Code Here

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

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

* text lower(string text)
*/
public class Lower extends GeneralFunction {
  public Lower() {
    super(new Column[] {
        new Column("text", TajoDataTypes.Type.TEXT)
    });
  }
View Full Code Here

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

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

* INT4 char_length(string text) or INT4 character_length(string text)
*/
public class CharLength extends GeneralFunction {
  public CharLength() {
    super(new Column[] {
        new Column("text", TajoDataTypes.Type.TEXT)
    });
  }
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

import org.apache.tajo.util.GeoUtil;

public class InCountry extends GeneralFunction {

  public InCountry() {
    super(new Column[] {new Column("addr", TajoDataTypes.Type.TEXT),
        new Column("code", TajoDataTypes.Type.TEXT)});
  }
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.