Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Construct the MutableRow from an existed row
  • Loading branch information
chenghao-intel committed Nov 12, 2014
commit a7518386aa384e89d01dac57619cc97caf23124a
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,11 @@ class GenericRow(protected[sql] val values: Array[Any]) extends Row {
def copy() = this
}

class GenericMutableRow(size: Int) extends GenericRow(size) with MutableRow {
class GenericMutableRow(v: Array[Any]) extends GenericRow(v) with MutableRow {
/** No-arg constructor for serialization. */
def this() = this(0)
def this() = this(null)

def this(size: Int) = this(new Array[Any](size))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a totally reasonable change if you want to pull this into another PR so I can commit it right away (optional if you want to finish the discussion above).


override def setBoolean(ordinal: Int, value: Boolean): Unit = { values(ordinal) = value }
override def setByte(ordinal: Int, value: Byte): Unit = { values(ordinal) = value }
Expand Down