List of usage examples for org.apache.spark.sql.catalyst.expressions.codegen UnsafeRowWriter write
@Override
public void write(int ordinal, double value)
From source file:com.splicemachine.db.iapi.types.HBaseRowLocation.java
License:Open Source License
@Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) throws StandardException { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else//from ww w . j a v a 2 s. c o m unsafeRowWriter.write(ordinal, slice.getByteCopy()); }
From source file:com.splicemachine.db.iapi.types.SQLBinary.java
License:Apache License
/** * * Write to a Project Tungsten UnsafeRow format. * * @see UnsafeRowWriter#write(int, byte[]) * * @param unsafeRowWriter/*from w w w . ja va2s. c o m*/ * @param ordinal * @throws StandardException */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) throws StandardException { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else { unsafeRowWriter.write(ordinal, dataValue); } }
From source file:com.splicemachine.db.iapi.types.SQLBoolean.java
License:Apache License
/** * * Write to a Project Tungsten UnsafeRow Format. * * @see UnsafeRowWriter#write(int, boolean) * * @param unsafeRowWriter//from w w w. java2 s. c o m * @param ordinal */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else { isNull = false; unsafeRowWriter.write(ordinal, value); } }
From source file:com.splicemachine.db.iapi.types.SQLChar.java
License:Apache License
/** * * Write into the Project Tungsten Format (UnsafeRow). * * @see UnsafeRowWriter#write(int, UTF8String) * * @param unsafeRowWriter//from ww w . j a v a 2 s. co m * @param ordinal */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else { unsafeRowWriter.write(ordinal, UTF8String.fromString(value)); } }
From source file:com.splicemachine.db.iapi.types.SQLDate.java
License:Apache License
/** * * Writes to a project Tungsten format (UnsafeRow). Writes the * data as an encoded int./*from w ww. j av a2s . c o m*/ * * @see UnsafeRowWriter#write(int, int) * * @param unsafeRowWriter * @param ordinal */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else unsafeRowWriter.write(ordinal, encodedDate); }
From source file:com.splicemachine.db.iapi.types.SQLDouble.java
License:Apache License
/** * * Write into Project Tungsten Format (UnsafeRow) * * @see UnsafeRowWriter#write(int, double) * * @param unsafeRowWriter/*w w w .jav a2s . c om*/ * @param ordinal */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else unsafeRowWriter.write(ordinal, value); }
From source file:com.splicemachine.db.iapi.types.SQLLongint.java
License:Apache License
@Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else// w w w. ja v a2 s .c o m unsafeRowWriter.write(ordinal, value); }
From source file:com.splicemachine.db.iapi.types.SQLRowId.java
License:Apache License
/** * * Write to a project Tungsten Format (UnsafeRow). * * @see UnsafeRowWriter#write(int, byte) * * @param unsafeRowWriter//from w w w. j av a 2 s .c o m * @param ordinal */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else unsafeRowWriter.write(ordinal, bytes); }
From source file:com.splicemachine.db.iapi.types.UserType.java
License:Apache License
/** * * Write to a Project Tungsten Format. Serializes the objects as byte[] * * @see UnsafeRowWriter#write(int, byte[]) * * @param unsafeRowWriter//from w ww. j a v a2 s . c o m * @param ordinal * @throws StandardException */ @Override public void write(UnsafeRowWriter unsafeRowWriter, int ordinal) throws StandardException { if (isNull()) unsafeRowWriter.setNullAt(ordinal); else unsafeRowWriter.write(ordinal, SerializationUtils.serialize((Serializable) value)); }