Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ParquetFormatScanSuite to not call CUDF directly #9093

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Changes from all commits
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
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