List of usage examples for org.apache.spark.sql.catalyst.expressions UnsafeRow isNullAt
@Override
public boolean isNullAt(int ordinal)
From source file:com.splicemachine.db.iapi.types.HBaseRowLocation.java
License:Open Source License
@Override public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException { if (unsafeRow.isNullAt(ordinal)) setToNull();//from w ww. j a v a 2 s.c om else slice = ByteSlice.wrap(unsafeRow.getBinary(ordinal)); }
From source file:com.splicemachine.db.iapi.types.SQLArray.java
License:Apache License
/** * * Read into a Project Tungsten format. This calls the Reference's * read method./*from w w w .java2 s . c om*/ * * @param unsafeRow * @param ordinal * @throws StandardException */ @Override public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException { if (unsafeRow.isNullAt(ordinal)) { value = null; setIsNull(true); } else { UnsafeArrayData unsafeArrayData = unsafeRow.getArray(ordinal); value = new DataValueDescriptor[unsafeArrayData.numElements()]; for (int i = 0; i < value.length; i++) { DataValueDescriptor dvd = type.cloneValue(true); dvd.read(unsafeArrayData, i); value[i] = dvd; } } }
From source file:com.splicemachine.db.iapi.types.SQLBinary.java
License:Apache License
/** * * Read from a Project Tungsten UnsafeRow format. * * @see UnsafeRow#getBinary(int)/* w w w.j a v a2 s .c o m*/ * * @throws StandardException */ @Override public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException { if (unsafeRow.isNullAt(ordinal)) setToNull(); else { isNull = false; dataValue = unsafeRow.getBinary(ordinal); } }
From source file:com.splicemachine.db.iapi.types.SQLBoolean.java
License:Apache License
/** * * Read from a Project Tungsten UnsafeRow Format. * * @see UnsafeRow#getBoolean(int)//from w ww . j a va2 s . c om * * @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.getBoolean(ordinal); } }
From source file:com.splicemachine.db.iapi.types.SQLChar.java
License:Apache License
/** * * Read into the Project Tungsten Format (UnsafeRow). * * @see UnsafeRow#getUTF8String(int)//from w w w .j ava2s . 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.getUTF8String(ordinal).toString(); } }
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 2 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 { encodedDate = unsafeRow.getInt(ordinal); isNull = false; } }
From source file:com.splicemachine.db.iapi.types.SQLDecimal.java
License:Apache License
/** * * Read from a Project Tungsten Format (UnsafeRow). * * @see UnsafeRow#getDecimal(int, int, int) * * @param unsafeRow//from ww w. ja v a 2 s . co m * @param ordinal * @throws StandardException */ @Override public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException { if (unsafeRow.isNullAt(ordinal)) setToNull(); else { isNull = false; value = unsafeRow.getDecimal(ordinal, precision, scale).toJavaBigDecimal(); } }
From source file:com.splicemachine.db.iapi.types.SQLDouble.java
License:Apache License
/** * * Read from a Project Tungsten Format.//from w ww. ja v a 2 s . c om * * @see UnsafeRow#getDouble(int) * * @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.getDouble(ordinal); } }
From source file:com.splicemachine.db.iapi.types.SQLInteger.java
License:Apache License
/** * * Read from a Project Tungsten Format (UnsafeRow) * * @see UnsafeRow#getInt(int)// w ww .j av a 2s .c om * * @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); } }
From source file:com.splicemachine.db.iapi.types.SQLLongint.java
License:Apache License
@Override public void read(UnsafeRow unsafeRow, int ordinal) throws StandardException { if (unsafeRow.isNullAt(ordinal)) setToNull();/* w w w .j ava 2 s . c om*/ else { isNull = false; value = unsafeRow.getLong(ordinal); } }