Skip to content

Commit 17009b6

Browse files
committed
changename
1 parent 7b688e1 commit 17009b6

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
@@ -144,14 +144,18 @@ class ParquetFileReaderSuite extends AnyFunSuite
144144
checkAnswer(actResult2, expResult2)
145145
}
146146

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

168-
testReadVariant("basic read variant") {
172+
testRead("basic read variant") {
169173
spark.range(0, 10, 1, 1).selectExpr(
170174
"parse_json(cast(id as string)) as basic_v",
171175
"named_struct('v', parse_json(cast(id as string))) as struct_v",
@@ -179,7 +183,7 @@ class ParquetFileReaderSuite extends AnyFunSuite
179183
)
180184
}
181185

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

0 commit comments

Comments
 (0)