File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,18 @@ class JoinedRow extends Row {
8181 this
8282 }
8383
84+ /** Updates this JoinedRow by updating its left base row. Returns itself. */
85+ def withLeft (newLeft : Row ): Row = {
86+ row1 = newLeft
87+ this
88+ }
89+
90+ /** Updates this JoinedRow by updating its right base row. Returns itself. */
91+ def withRight (newRight : Row ): Row = {
92+ row2 = newRight
93+ this
94+ }
95+
8496 def iterator = row1.iterator ++ row2.iterator
8597
8698 def length = row1.length + row2.length
@@ -124,4 +136,9 @@ class JoinedRow extends Row {
124136 }
125137 new GenericRow (copiedValues)
126138 }
139+
140+ override def toString () = {
141+ val row = (if (row1 != null ) row1 else Seq [Any ]()) ++ (if (row2 != null ) row2 else Seq [Any ]())
142+ s " [ ${row.mkString(" ," )}] "
143+ }
127144}
You can’t perform that action at this time.
0 commit comments