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

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

Introduction

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

Prototype

@Override
    public short getShort(int ordinal) 

Source Link

Usage

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

License:Apache License

/**
 *
 * Reads into a Project Tungsten Format (UnsafeRow)
 *
 * @see UnsafeRow#getShort(int)//from   w ww .  ja  v  a2s  .  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.getShort(ordinal);
    }
}