Skip to content

Commit 2157bfc

Browse files
committed
Fix parquet filter suite
1 parent 636d9fc commit 2157bfc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

sql/core/src/test/scala/org/apache/spark/sql/parquet/ParquetFilterSuite.scala

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ class ParquetFilterSuite extends QueryTest with ParquetTest {
8787
test("filter pushdown - boolean") {
8888
withParquetRDD((true :: false :: Nil).map(Tuple1.apply)) { rdd =>
8989
checkFilterPushdown(rdd, '_1)('_1 === true, classOf[Eq[java.lang.Boolean]])(true)
90-
checkFilterPushdown(rdd, '_1)('_1 !== true, classOf[Operators.Not])(false)
90+
checkFilterPushdown(rdd, '_1)('_1 !== true, classOf[Operators.NotEq[java.lang.Boolean]])(false)
9191
}
9292
}
9393

9494
test("filter pushdown - integer") {
9595
withParquetRDD((1 to 4).map(Tuple1.apply)) { rdd =>
9696
checkFilterPushdown(rdd, '_1)('_1 === 1, classOf[Eq[Integer]])(1)
97-
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.Not]) {
97+
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.NotEq[Integer]]) {
9898
(2 to 4).map(Row.apply(_))
9999
}
100100

@@ -118,9 +118,9 @@ class ParquetFilterSuite extends QueryTest with ParquetTest {
118118
}
119119

120120
test("filter pushdown - long") {
121-
withParquetRDD((1 to 4).map(i => Tuple1.apply(i.toLong))) { rdd =>
121+
withParquetRDD((1 to 4).map(i => Tuple1(i.toLong))) { rdd =>
122122
checkFilterPushdown(rdd, '_1)('_1 === 1, classOf[Eq[java.lang.Long]])(1)
123-
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.Not]) {
123+
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.NotEq[java.lang.Long]]) {
124124
(2 to 4).map(Row.apply(_))
125125
}
126126

@@ -144,9 +144,9 @@ class ParquetFilterSuite extends QueryTest with ParquetTest {
144144
}
145145

146146
test("filter pushdown - float") {
147-
withParquetRDD((1 to 4).map(i => Tuple1.apply(i.toFloat))) { rdd =>
147+
withParquetRDD((1 to 4).map(i => Tuple1(i.toFloat))) { rdd =>
148148
checkFilterPushdown(rdd, '_1)('_1 === 1, classOf[Eq[java.lang.Float]])(1)
149-
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.Not]) {
149+
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.NotEq[java.lang.Float]]) {
150150
(2 to 4).map(Row.apply(_))
151151
}
152152

@@ -170,9 +170,9 @@ class ParquetFilterSuite extends QueryTest with ParquetTest {
170170
}
171171

172172
test("filter pushdown - double") {
173-
withParquetRDD((1 to 4).map(i => Tuple1.apply(i.toDouble))) { rdd =>
173+
withParquetRDD((1 to 4).map(i => Tuple1(i.toDouble))) { rdd =>
174174
checkFilterPushdown(rdd, '_1)('_1 === 1, classOf[Eq[java.lang.Double]])(1)
175-
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.Not]) {
175+
checkFilterPushdown(rdd, '_1)('_1 !== 1, classOf[Operators.NotEq[java.lang.Double]]) {
176176
(2 to 4).map(Row.apply(_))
177177
}
178178

@@ -196,9 +196,9 @@ class ParquetFilterSuite extends QueryTest with ParquetTest {
196196
}
197197

198198
test("filter pushdown - string") {
199-
withParquetRDD((1 to 4).map(i => Tuple1.apply(i.toString))) { rdd =>
199+
withParquetRDD((1 to 4).map(i => Tuple1(i.toString))) { rdd =>
200200
checkFilterPushdown(rdd, '_1)('_1 === "1", classOf[Eq[String]])("1")
201-
checkFilterPushdown(rdd, '_1)('_1 !== "1", classOf[Operators.Not]) {
201+
checkFilterPushdown(rdd, '_1)('_1 !== "1", classOf[Operators.NotEq[String]]) {
202202
(2 to 4).map(i => Row.apply(i.toString))
203203
}
204204

@@ -226,9 +226,9 @@ class ParquetFilterSuite extends QueryTest with ParquetTest {
226226
def b: Array[Byte] = int.toString.getBytes("UTF-8")
227227
}
228228

229-
withParquetRDD((1 to 4).map(i => Tuple1.apply(i.b))) { rdd =>
229+
withParquetRDD((1 to 4).map(i => Tuple1(i.b))) { rdd =>
230230
checkBinaryFilterPushdown(rdd, '_1)('_1 === 1.b, classOf[Eq[Array[Byte]]])(1.b)
231-
checkBinaryFilterPushdown(rdd, '_1)('_1 !== 1.b, classOf[Operators.Not]) {
231+
checkBinaryFilterPushdown(rdd, '_1)('_1 !== 1.b, classOf[Operators.NotEq[Array[Byte]]]) {
232232
(2 to 4).map(i => Row.apply(i.b)).toSeq
233233
}
234234

0 commit comments

Comments
 (0)