Example usage for org.apache.spark.sql.catalyst.expressions UnsafeRow getInt

List of usage examples for org.apache.spark.sql.catalyst.expressions UnsafeRow getInt

Introduction

In this page you can find the example usage for org.apache.spark.sql.catalyst.expressions UnsafeRow getInt.

Prototype

@Override
    public int getInt(int ordinal) 

Source Link

Usage

From source file:com.splicemachine.db.iapi.types.SQLDate.java

License:Apache License

/**
 *
 * Reads from a Project Tungsten UnsafeRow format.  The data is read as an int.
 *
 * @see UnsafeRow#getInt(int)/*from w  w  w .j  a  v  a 2s .  co m*/
 *
  * @param unsafeRow
 * @param ordinal
 * @throws StandardException
  */
@Override
public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException {
    if (unsafeRow.isNullAt(ordinal))
        setToNull();
    else {
        encodedDate = unsafeRow.getInt(ordinal);
        isNull = false;
    }
}

From source file:com.splicemachine.db.iapi.types.SQLInteger.java

License:Apache License

/**
 *
 * Read from a Project Tungsten Format (UnsafeRow)
 *
 * @see UnsafeRow#getInt(int)//from ww w.j  a  va2  s  . c  o  m
 *
 * @param unsafeRow
 * @param ordinal
 * @throws StandardException
  */
@Override
public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException {
    if (unsafeRow.isNullAt(ordinal))
        setToNull();
    else {
        isNull = false;
        value = unsafeRow.getInt(ordinal);
    }
}