Skip to content

[SQL] Construct the MutableRow from an Array #3217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
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
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