Untitled

mail@pastecode.io avatar
unknown
plain_text
25 days ago
394 B
1
Indexable
Never
import org.apache.spark.sql.Row;
import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema;
import scala.collection.mutable.WrappedArray;

// Assuming 'row' is an existing Row object and 'l2' is a long value
Row updatedRow = new GenericRowWithSchema(
        new Object[] {BoxesRunTime.boxToLong(l2), ((WrappedArray<?>)row.get(0)).$colon$plus(l2)},
        row.schema()
);