Skip to content

Commit f93f594

Browse files
committed
changename
1 parent 4ccd82f commit f93f594

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

kernel/kernel-defaults/src/test/scala/io/delta/kernel/defaults/internal/parquet/ParquetFileReaderSuite.scala

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,18 @@ class ParquetFileReaderSuite extends AnyFunSuite
143143
checkAnswer(actResult2, expResult2)
144144
}
145145

146-
private def testReadVariant(testName: String)(df: => DataFrame): Unit = {
146+
/**
147+
* Writes a table using Spark, reads it back using the Delta Kernel implementation, and asserts
148+
* that the results are the same.
149+
*/
150+
private def testRead(testName: String)(df: => DataFrame): Unit = {
147151
test(testName) {
148-
withTable("test_variant_table") {
152+
withTable("test_table") {
149153
df.write
150154
.format("delta")
151155
.mode("overwrite")
152-
.saveAsTable("test_variant_table")
153-
val path = spark.sql("describe table extended `test_variant_table`")
156+
.saveAsTable("test_table")
157+
val path = spark.sql("describe table extended `test_table`")
154158
.where("col_name = 'Location'")
155159
.collect()(0)
156160
.getString(1)
@@ -164,7 +168,7 @@ class ParquetFileReaderSuite extends AnyFunSuite
164168
}
165169
}
166170

167-
testReadVariant("basic read variant") {
171+
testRead("basic read variant") {
168172
spark.range(0, 10, 1, 1).selectExpr(
169173
"parse_json(cast(id as string)) as basic_v",
170174
"named_struct('v', parse_json(cast(id as string))) as struct_v",
@@ -178,7 +182,7 @@ class ParquetFileReaderSuite extends AnyFunSuite
178182
)
179183
}
180184

181-
testReadVariant("basic null variant") {
185+
testRead("basic null variant") {
182186
spark.range(0, 10, 1, 1).selectExpr(
183187
"cast(null as variant) basic_v",
184188
"named_struct('v', cast(null as variant)) as struct_v",

0 commit comments

Comments
 (0)