linliu-code commented on code in PR #13300:
URL: https://github.com/apache/hudi/pull/13300#discussion_r2093390444


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -93,22 +94,21 @@ public final class HoodieFileGroupReader<T> implements 
Closeable {
   // the allowInflightInstants flag would need to be set to true. This would 
ensure the HoodieMergedLogRecordReader
   // considers the log records which are inflight.
   private boolean allowInflightInstants;
+  private List<Predicate> filters;
 
-  public HoodieFileGroupReader(HoodieReaderContext<T> readerContext, 
HoodieStorage storage,
-      String tablePath,
-      String latestCommitTime, FileSlice fileSlice, Schema dataSchema, Schema 
requestedSchema,
-      Option<InternalSchema> internalSchemaOpt, HoodieTableMetaClient 
hoodieTableMetaClient,
-      TypedProperties props,
-      long start, long length, boolean shouldUseRecordPosition) {
+  public HoodieFileGroupReader(HoodieReaderContext<T> readerContext, 
HoodieStorage storage, String tablePath,
+                               String latestCommitTime, FileSlice fileSlice, 
Schema dataSchema, Schema requestedSchema,
+                               Option<InternalSchema> internalSchemaOpt, 
HoodieTableMetaClient hoodieTableMetaClient,
+                               TypedProperties props, long start, long length, 
boolean shouldUseRecordPosition, List<Predicate> filters) {
     this(readerContext, storage, tablePath, latestCommitTime, fileSlice, 
dataSchema,
         requestedSchema, internalSchemaOpt, hoodieTableMetaClient, props, 
start, length,
-        shouldUseRecordPosition, false);
+        shouldUseRecordPosition, filters, false);
   }
 
   public HoodieFileGroupReader(HoodieReaderContext<T> readerContext, 
HoodieStorage storage, String tablePath,
                                String latestCommitTime, FileSlice fileSlice, 
Schema dataSchema, Schema requestedSchema,
                                Option<InternalSchema> internalSchemaOpt, 
HoodieTableMetaClient hoodieTableMetaClient, TypedProperties props,
-                               long start, long length, boolean 
shouldUseRecordPosition, boolean allowInflightInstants) {
+                               long start, long length, boolean 
shouldUseRecordPosition, List<Predicate> filters, boolean 
allowInflightInstants) {

Review Comment:
   If we only need to support current filters, set<key> or set<key_prefixes>, 
one predicate is enough. We can just pass a list of predicates, and only use 
the first predicate as of now. This list of predicates should not cause any 
performance issues, and more extensable.



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