Skip to content

Commit

Permalink
Update ParquetFormatScanSuite to not call CUDF directly (NVIDIA#9093)
Browse files Browse the repository at this point in the history
Signed-off-by: Robert (Bobby) Evans <bobby@apache.org>
  • Loading branch information
revans2 authored and mythrocks committed Aug 23, 2023
1 parent 8097d0f commit bddef35
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import java.time.LocalDateTime
import scala.collection.JavaConverters.mapAsJavaMapConverter
import scala.concurrent.duration._

import ai.rapids.cudf
import com.nvidia.spark.rapids.Arm.withResource
import com.nvidia.spark.rapids.SparkQueryCompareTestSuite
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
Expand All @@ -46,8 +44,6 @@ import org.apache.spark.util.Utils
* A lot of this testing code is based off of similar Spark tests.
*/
class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually {
private val debugPrinter = cudf.TableDebug.get();

implicit class RecordConsumerDSL(consumer: RecordConsumer) {
def message(f: => Unit): Unit = {
consumer.startMessage()
Expand Down Expand Up @@ -1131,10 +1127,6 @@ class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually
}
})

withResource(cudf.Table.readParquet(new File(testPath))) { table =>
debugPrinter.debug("DIRECT READ", table)
}

val data = spark.read.parquet(testPath).collect()
sameRows(Seq(Row(Array(0, 1), Array("TEST"))), data)
}
Expand Down Expand Up @@ -1167,10 +1159,6 @@ class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually
}
})

withResource(cudf.Table.readParquet(new File(testPath))) { table =>
debugPrinter.debug("DIRECT READ", table)
}

val data = spark.read.parquet(testPath).collect()
sameRows(Seq(Row(Array(0, 1))), data)
}
Expand Down Expand Up @@ -1210,10 +1198,6 @@ class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually
}
})

withResource(cudf.Table.readParquet(new File(testPath))) { table =>
debugPrinter.debug("DIRECT READ", table)
}

val data = spark.read.parquet(testPath).collect()
sameRows(Seq(Row(Array(Row("TEST", 0), Row("DATA", 1)))), data)
}
Expand Down Expand Up @@ -1252,10 +1236,6 @@ class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually
}
})

withResource(cudf.Table.readParquet(new File(testPath))) { table =>
debugPrinter.debug("DIRECT READ", table)
}

val data = spark.read.parquet(testPath).collect()
sameRows(Seq(Row(Array(Row(0), Row(1)))), data)
}
Expand Down Expand Up @@ -1294,10 +1274,6 @@ class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually
}
})

withResource(cudf.Table.readParquet(new File(testPath))) { table =>
debugPrinter.debug("DIRECT READ", table)
}

val data = spark.read.parquet(testPath).collect()
sameRows(Seq(Row(Array(Row(0), Row(1)))), data)
}
Expand Down Expand Up @@ -1435,10 +1411,6 @@ class ParquetFormatScanSuite extends SparkQueryCompareTestSuite with Eventually
}
})

withResource(cudf.Table.readParquet(new File(testPath))) { table =>
debugPrinter.debug("DIRECT READ", table)
}

val data = spark.read.parquet(testPath).collect()
sameRows(Seq(Row(Map(0 -> 2, 1 -> 3))), data)
}
Expand Down

0 comments on commit bddef35

Please sign in to comment.