Davis-Zhang-Onehouse commented on code in PR #13523:
URL: https://github.com/apache/hudi/pull/13523#discussion_r2233504197
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/feature/index/testHoodieBackedTableMetadataIndexLookup.scala:
##########
@@ -151,10 +152,13 @@ abstract class
HoodieBackedTableMetadataIndexLookupTestBase extends HoodieSparkS
// Create table with specified version
spark.sql(createTableStatementProvider.apply())
- // Insert initial test data
- spark.sql(s"insert into $tableName values('1', 'b1', 10, 1000)")
- spark.sql(s"insert into $tableName values('2', 'b2', 20, 1000)")
- spark.sql(s"insert into $tableName" + " values('$', '$', 30, 1000)")
+ // Insert initial test data including records with $ characters
+ spark.sql(s"insert into $tableName values('a1', 'b1', 10, 1000)")
+ spark.sql(s"insert into $tableName values('a2', 'b2', 20, 1000)")
Review Comment:
> another case should be added where multiple record keys have the same
secondary key value
covered in follow up PR https://github.com/apache/hudi/pull/13622
> add a test case where the secondary key value is updated for a record key
(is there already a test case on this?).
covered by
test("Test Secondary Index With Nullable Columns")
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/feature/index/testHoodieBackedTableMetadataIndexLookup.scala:
##########
@@ -319,8 +326,8 @@ abstract class HoodieBackedTableMetadataIndexLookupTestBase
extends HoodieSparkS
s"Position should be >= INVALID_POSITION for table version
${getTableVersion}")
}
- // Case 3: Non-existing secondary keys
- val nonExistKeys = HoodieListData.eager(List("non_exist_1",
"non_exist_2").asJava)
+ // Case 3: Non-existing secondary keys, some matches the prefix of
existing records
+ val nonExistKeys = HoodieListData.eager(List("", "b", "non_exist_1",
"non_exist_2").asJava)
Review Comment:
addressed in follow up https://github.com/apache/hudi/pull/13622
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]