yihua commented on code in PR #11678:
URL: https://github.com/apache/hudi/pull/11678#discussion_r1690625142


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestRecordLevelIndexWithSQL.scala:
##########
@@ -70,45 +77,45 @@ class TestRecordLevelIndexWithSQL extends 
RecordLevelIndexTestBase {
     assertEquals(5, spark.sql("select * from " + sqlTempTable).count())
 
     // non existing entries in EqualTo query
-    var dataFilter: Expression = EqualTo(attribute("_row_key"), Literal("xyz"))
+    var dataFilter: Expression = EqualTo(attribute(colName), Literal("xyz"))
     assertEquals(0, spark.sql("select * from " + sqlTempTable + " where " + 
dataFilter.sql).count())
     assertEquals(0, fileIndex.listFiles(Seq.empty, Seq(dataFilter)).flatMap(s 
=> s.files).size)
 
     // non existing entries in IN query
-    dataFilter = In(attribute("_row_key"), List.apply(Literal("xyz"), 
Literal("abc")))
+    dataFilter = In(attribute(colName), List.apply(Literal("xyz"), 
Literal("abc")))

Review Comment:
   How do we make sure the record level index is used in pruning in the test, 
i.e., will the test still pass if record level index is absent or not used?



##########
hudi-spark-datasource/hudi-spark-common/src/test/scala/org/apache/hudi/TestSecondaryIndexSupport.scala:
##########
@@ -51,7 +51,7 @@ class TestSecondaryIndexSupport {
 
     // Case 4: EqualTo filters on simple AttributeReference and Literal which 
should return non-empty result
     testFilter = EqualTo(AttributeReference("_row_key", StringType, nullable = 
true)(), Literal("row1"))
-    result = filterQueriesWithSecondaryKey(Seq(testFilter), 
Option.apply(HoodieMetadataField.RECORD_KEY_METADATA_FIELD.getFieldName))._2
+    result = filterQueriesWithSecondaryKey(Seq(testFilter), 
Option.apply("_row_key"))._2

Review Comment:
   Similar here on parameterizing the tests.



-- 
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]

Reply via email to