bhat-vinay commented on code in PR #10955:
URL: https://github.com/apache/hudi/pull/10955#discussion_r1548899945
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestRecordLevelIndexWithSQL.scala:
##########
@@ -155,4 +156,36 @@ class TestRecordLevelIndexWithSQL extends
RecordLevelIndexTestBase {
val readDf = spark.read.format("hudi").options(hudiOpts).load(basePath)
readDf.registerTempTable(sqlTempTable)
}
+
+ @Test
+ def testInFilterOnNonRecordKey(): Unit = {
Review Comment:
Yes. Without the fix, the test query return 0 rows - as the file pruning
happens based on record-key (even when the query predicate references
non-record-key col), thus incorrectly returning candidate files from partition
'p1'.
```
org.opentest4j.AssertionFailedError:
Expected :2
Actual :0
<Click to see difference>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at
org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at
org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:166)
at
org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:161)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:611)
at
org.apache.hudi.functional.TestRecordLevelIndexWithSQL.testInFilterOnNonRecordKey(TestRecordLevelIndexWithSQL.scala:189)
.......
.......
.......
```
--
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]