Examples of asInt8()


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

  @Override
  public long getLong(int fieldId) throws SQLException {
    Datum datum = cur.get(fieldId - 1);
    handleNull(datum);
    return datum.asInt8();
  }

  @Override
  public long getLong(String name) throws SQLException {
    Datum datum = cur.get(findColumn(name));
View Full Code Here

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

  @Override
  public long getLong(String name) throws SQLException {
    Datum datum = cur.get(findColumn(name));
    handleNull(datum);
    return datum.asInt8();
  }

  @Override
  public Object getObject(int fieldId) throws SQLException {
    Datum d = cur.get(fieldId - 1);
View Full Code Here

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

    switch(dataType) {
      case BOOLEAN:  return d.asBool();
      case INT1:
      case INT2: return d.asInt2();
      case INT4: return d.asInt4();
      case INT8: return d.asInt8();
      case TEXT:
      case CHAR:
      case DATE:
      case VARCHAR:  return d.asChars();
      case FLOAT4:  return d.asFloat4();
View Full Code Here

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

   */
  @Override
  public long getLong(int fieldId) throws SQLException {
    Datum datum = cur.get(fieldId - 1);
    handleNull(datum);
    return datum.asInt8();
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

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

   */
  @Override
  public long getLong(String name) throws SQLException {
    Datum datum = cur.get(findColumn(name));
    handleNull(datum);
    return datum.asInt8();
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

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

  public void merge(FunctionContext context, Tuple params) {
    SumContext distinctContext = (SumContext) context;
    Datum value = params.get(0);
    if ((distinctContext.latest == null || (!distinctContext.latest.equals(value)) && !(value instanceof NullDatum))) {
      distinctContext.latest = value;
      distinctContext.sum += value.asInt8();
    }
  }

  @Override
  public Datum getPartialResult(FunctionContext ctx) {
View Full Code Here

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

    if(value2Datum instanceof NullDatum) {
      return NullDatum.get();
    }

    long value1 = value1Datum.asInt8();
    long value2 = value2Datum.asInt8();

    if (value2 == 0) {
      return NullDatum.get();
    }
View Full Code Here

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

    Datum datum = params.get(0);
    if(datum instanceof NullDatum) {
      return NullDatum.get();
    }

    return  DatumFactory.createText(Long.toBinaryString(datum.asInt8()));
  }

}
View Full Code Here

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

    Datum valueDatum = params.get(0);
    if(valueDatum instanceof NullDatum) {
      return NullDatum.get();
    }

    return DatumFactory.createInt8(Math.abs(valueDatum.asInt8()));
  }
}
View Full Code Here

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

    if(value2Datum instanceof NullDatum) {
      return NullDatum.get();
    }

    long value1 = value1Datum.asInt8();
    long value2 = value2Datum.asInt8();

    if (value2 == 0) {
      return NullDatum.get();
    }
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.