Skip to content
Closed
Show file tree
Hide file tree
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
Prev Previous commit
Avoid usage of Row.merge
  • Loading branch information
MaxGekk committed Dec 13, 2019
commit eb672575e62c9ed920004206a5d288566712697b
6 changes: 4 additions & 2 deletions sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.mockito.Mockito._
import org.apache.spark.TestUtils.{assertNotSpilled, assertSpilled}
import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation
import org.apache.spark.sql.catalyst.expressions.{Ascending, SortOrder}
import org.apache.spark.sql.catalyst.expressions.{Ascending, GenericRow, SortOrder}
import org.apache.spark.sql.catalyst.plans.logical.Filter
import org.apache.spark.sql.execution.{BinaryExecNode, FilterExec, SortExec, SparkPlan}
import org.apache.spark.sql.execution.joins._
Expand Down Expand Up @@ -238,7 +238,9 @@ class JoinSuite extends QueryTest with SharedSparkSession {

checkAnswer(
bigDataX.join(bigDataY).where($"x.key" === $"y.key"),
testData.rdd.flatMap(row => Seq.fill(16)(Row.merge(row, row))).collect().toSeq)
testData.rdd.flatMap { row =>
Seq.fill(16)(new GenericRow(Seq(row, row).flatMap(_.toSeq).toArray))
}.collect().toSeq)
}

test("cartesian product join") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import scala.collection.parallel.immutable.ParVector

import org.apache.spark.{AccumulatorSuite, SparkException}
import org.apache.spark.scheduler.{SparkListener, SparkListenerJobStart}
import org.apache.spark.sql.catalyst.expressions.GenericRow
import org.apache.spark.sql.catalyst.optimizer.ConvertToLocalRelation
import org.apache.spark.sql.catalyst.util.StringUtils
import org.apache.spark.sql.execution.HiveResult.hiveResultString
Expand Down Expand Up @@ -783,8 +784,9 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession {
| SELECT * FROM testData UNION ALL
| SELECT * FROM testData) y
|WHERE x.key = y.key""".stripMargin),
testData.rdd.flatMap(
row => Seq.fill(16)(Row.merge(row, row))).collect().toSeq)
testData.rdd.flatMap { row =>
Seq.fill(16)(new GenericRow(Seq(row, row).flatMap(_.toSeq).toArray))
}.collect().toSeq)
}

test("cartesian product join") {
Expand Down