danny0405 commented on code in PR #14183:
URL: https://github.com/apache/hudi/pull/14183#discussion_r2480073859


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/SparkFileFormatInternalRowReaderContext.scala:
##########
@@ -262,6 +265,13 @@ object SparkFileFormatInternalRowReaderContext {
     metaRefCount == filter.references.length || metaRefCount == 0
   }
 
+  /**
+   * Only valid if the filter's references only include primary key columns or 
{@link HoodieRecord.RECORD_KEY_METADATA_FIELD}
+   */
+  def filterIsSafeForPrimaryKey(filter: Filter, recordKeyFields: Set[String]): 
Boolean = {
+    filter.references.forall(c => recordKeyFields.contains(c.toLowerCase) || 
c.equalsIgnoreCase(HoodieRecord.RECORD_KEY_METADATA_FIELD))

Review Comment:
   seems not right, all the record key fields should be included.



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