Skip to content

Commit dd0ddbc

Browse files
committed
Fixed further more test cases
1 parent 91cb915 commit dd0ddbc

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/joins/ExistenceJoinSuite.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ class ExistenceJoinSuite extends SparkPlanTest with SharedSQLContext {
6262
Row(6, null)
6363
)), new StructType().add("c", IntegerType).add("d", DoubleType))
6464

65-
private lazy val singleConditionEQ = (left.col("a") === right.col("c")).expr
65+
private lazy val singleConditionEQ = (left.colInternal("a") === right.colInternal("c")).expr
6666

6767
private lazy val composedConditionEQ = {
68-
And((left.col("a") === right.col("c")).expr,
69-
LessThan(left.col("b").expr, right.col("d").expr))
68+
And((left.colInternal("a") === right.colInternal("c")).expr,
69+
LessThan(left.colInternal("b").expr, right.colInternal("d").expr))
7070
}
7171

7272
private lazy val composedConditionNEQ = {
73-
And((left.col("a") < right.col("c")).expr,
74-
LessThan(left.col("b").expr, right.col("d").expr))
73+
And((left.colInternal("a") < right.colInternal("c")).expr,
74+
LessThan(left.colInternal("b").expr, right.colInternal("d").expr))
7575
}
7676

7777
// Note: the input dataframes and expression must be evaluated lazily because
@@ -252,6 +252,7 @@ class ExistenceJoinSuite extends SparkPlanTest with SharedSQLContext {
252252
LeftAnti,
253253
left,
254254
rightUniqueKey,
255-
(left.col("a") === rightUniqueKey.col("c") && left.col("b") < rightUniqueKey.col("d")).expr,
255+
(left.colInternal("a") === rightUniqueKey.colInternal("c") &&
256+
left.colInternal("b") < rightUniqueKey.colInternal("d")).expr,
256257
Seq(Row(1, 2.0), Row(1, 2.0), Row(3, 3.0), Row(null, null), Row(null, 5.0), Row(6, null)))
257258
}

sql/core/src/test/scala/org/apache/spark/sql/execution/joins/InnerJoinSuite.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext {
219219
"inner join, one match per row",
220220
myUpperCaseData,
221221
myLowerCaseData,
222-
() => (myUpperCaseData.col("N") === myLowerCaseData.col("n")).expr,
222+
() => (myUpperCaseData.colInternal("N") === myLowerCaseData.colInternal("n")).expr,
223223
Seq(
224224
(1, "A", 1, "a"),
225225
(2, "B", 2, "b"),
@@ -235,7 +235,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext {
235235
"inner join, multiple matches",
236236
left,
237237
right,
238-
() => (left.col("a") === right.col("a")).expr,
238+
() => (left.colInternal("a") === right.colInternal("a")).expr,
239239
Seq(
240240
(1, 1, 1, 1),
241241
(1, 1, 1, 2),
@@ -252,7 +252,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext {
252252
"inner join, no matches",
253253
left,
254254
right,
255-
() => (left.col("a") === right.col("a")).expr,
255+
() => (left.colInternal("a") === right.colInternal("a")).expr,
256256
Seq.empty
257257
)
258258
}
@@ -264,7 +264,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext {
264264
"inner join, null safe",
265265
left,
266266
right,
267-
() => (left.col("b") <=> right.col("b")).expr,
267+
() => (left.colInternal("b") <=> right.colInternal("b")).expr,
268268
Seq(
269269
(1, 0, 1, 0),
270270
(2, null, 2, null)
@@ -280,7 +280,7 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext {
280280
"SPARK-15822 - test structs as keys",
281281
left,
282282
right,
283-
() => (left.col("key") === right.col("key")).expr,
283+
() => (left.colInternal("key") === right.colInternal("key")).expr,
284284
Seq(
285285
(Row(0, 0), "L0", Row(0, 0), "R0"),
286286
(Row(1, 1), "L1", Row(1, 1), "R1"),

sql/core/src/test/scala/org/apache/spark/sql/execution/joins/OuterJoinSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class OuterJoinSuite extends SparkPlanTest with SharedSQLContext {
5757
)), new StructType().add("c", IntegerType).add("d", DoubleType))
5858

5959
private lazy val condition = {
60-
And((left.col("a") === right.col("c")).expr,
61-
LessThan(left.col("b").expr, right.col("d").expr))
60+
And((left.colInternal("a") === right.colInternal("c")).expr,
61+
LessThan(left.colInternal("b").expr, right.colInternal("d").expr))
6262
}
6363

6464
// Note: the input dataframes and expression must be evaluated lazily because

0 commit comments

Comments
 (0)