Skip to content

Commit c06511e

Browse files
committed
update
1 parent 7c8babb commit c06511e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestTimeTravelTable.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ class TestTimeTravelTable extends HoodieSparkSqlTestBase {
300300
withTempDir { tmp =>
301301
spark.sql("set hoodie.schema.on.read.enable=true")
302302
val tableName = generateTableName
303-
val tablePath = s"${tmp.getCanonicalPath}/$tableName"
304303
spark.sql(
305304
s"""
306305
|create table $tableName (
@@ -313,7 +312,7 @@ class TestTimeTravelTable extends HoodieSparkSqlTestBase {
313312
| primaryKey = 'id',
314313
| preCombineField = 'ts'
315314
| )
316-
| location '$tablePath'
315+
| location '${tmp.getCanonicalPath}/$tableName'
317316
""".stripMargin)
318317

319318
spark.sql(s"insert into $tableName values(1, 'a1', 10, 1000)")
@@ -345,7 +344,9 @@ class TestTimeTravelTable extends HoodieSparkSqlTestBase {
345344
Seq(2, "a2", 11.0, 1100, "hudi")
346345
)
347346

348-
checkAnswer(s"select * from $tableName")(
347+
val result3 = spark.sql(s"select * from ${tableName} order by id")
348+
.drop("_hoodie_commit_time", "_hoodie_commit_seqno", "_hoodie_record_key", "_hoodie_partition_path", "_hoodie_file_name").collect()
349+
checkAnswer(result3)(
349350
Seq(1, "a1", 1000, null),
350351
Seq(2, "a2", 1100, "hudi")
351352
)

0 commit comments

Comments
 (0)