cshuo commented on code in PR #18074:
URL: https://github.com/apache/hudi/pull/18074#discussion_r2757883179


##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/table/TestHoodieTableSource.java:
##########
@@ -788,4 +788,48 @@ void testNewHoodieSourceWithMaxCompactionMemory() throws 
Exception {
     HoodieTableSource tableSource = createHoodieTableSource(conf);
     assertNotNull(tableSource, "HoodieTableSource with custom compaction 
memory should be created");
   }
+
+  @Test
+  void testPartitionPrunerInStreamingMode() throws Exception {
+    beforeEach();
+    Configuration conf = 
TestConfigurations.getDefaultConf(tempFile.getAbsolutePath());
+    conf.set(FlinkOptions.READ_SOURCE_V2_ENABLED, true);
+    conf.set(FlinkOptions.READ_AS_STREAMING, true);
+
+    // Apply partition filter
+    FieldReferenceExpression partRef = new 
FieldReferenceExpression("partition", DataTypes.STRING(), 4, 4);
+    ValueLiteralExpression partLiteral = new ValueLiteralExpression("par1", 
DataTypes.STRING().notNull());
+    CallExpression partFilter = CallExpression.permanent(
+        BuiltInFunctionDefinitions.EQUALS,
+        Arrays.asList(partRef, partLiteral),
+        DataTypes.BOOLEAN());
+
+    HoodieTableSource tableSource = createHoodieTableSource(conf);
+    tableSource.applyFilters(Arrays.asList(partFilter));
+
+    assertNotNull(tableSource, "HoodieTableSource with partition pruner should 
be created");

Review Comment:
   Need validating the actual pruning of partitions.



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