raminqaf opened a new pull request, #28128:
URL: https://github.com/apache/flink/pull/28128

   ### What is the purpose of the change                                        
                                                                                
             
                                                                                
                                                                                
           
   Adds `fromChangelog()` and `toChangelog()` convenience methods to 
PartitionedTable so users can invoke the built-in `FROM_CHANGELOG` and 
`TO_CHANGELOG PTF`s with set semantics from the Table API. Today this requires 
the verbose `partitionBy(...).process("FROM_CHANGELOG", ...)` form.
   
   ###  Brief change log                                                        
                                                                                
              
                                                                                
                                                                                
           
   - Added `fromChangelog(Expression...)` and `toChangelog(Expression...)` to 
PartitionedTable.                                                               
               
   - Implemented them in PartitionedTableImpl by delegating to `process(...)` 
on the partitioned operation tree.                                              
             
   - Cross-linked the new methods from the row-semantics overloads in 
Table.java.                                                                     
                   
   - Added `TABLE_API_RETRACT_PARTITION_BY` test programs to both 
`FromChangelogTestPrograms` and `ToChangelogTestPrograms`, registered in the 
corresponding *SemanticTests.   
   - Updated `docs/content/docs/sql/reference/queries/changelog.md` with the 
new Table API entry points.                                                     
              
                                                                                
                                                                                
           
   ### Verifying this change                                                    
                                                                                
             
                                                                                
                                                                                
           
   This change added tests and can be verified as follows:                      
                                                                                
         
                                                                                
                                                                                
           
   - `FromChangelogSemanticTests#TABLE_API_RETRACT_PARTITION_BY` exercises 
`cdcStream.partitionBy($("id")).fromChangelog()` with a retract input.          
                  
   - `ToChangelogSemanticTests#TABLE_API_RETRACT_PARTITION_BY` exercises 
`myTable.partitionBy($("id")).toChangelog()` with a retract input where the 
partition key is a non-leading column.                                          
                                                                                
                         
   - Both verify the optimized plan and the produced changelog.                 
                                                                                
         
                                                                                
                                                                                
           
   ### Does this pull request potentially affect one of the following parts:    
                                                                                
             
                                                                                
                                                                                
           
   - Dependencies (does it add or upgrade a dependency): no                     
                                                                                
         
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: yes. Two new methods on `@PublicEvolving` 
PartitionedTable.                              
   - The serializers: no                                                        
                                                                                
         
   - The runtime per-record code paths (performance sensitive): no              
                                                                                
         
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no                      
                  
   - The S3 file system connector: no                                           
                                                                                
         
                                                                                
                                                                                
           
   ### Documentation                                                            
                                                                                
             
                                                                                
                                                                                
           
   - Does this pull request introduce a new feature? yes                        
                                                                                
         
   - If yes, how is the feature documented? docs and JavaDocs      
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change the checkbox below to `[X]` followed by the name of the tool, and 
uncomment the
   "Generated-by" line. See the ASF Generative Tooling Guidance for details:
   https://www.apache.org/legal/generative-tooling.html
   
   You are responsible for the quality and correctness of every change in this 
PR
   regardless of the tooling used. Low-effort AI-generated PRs will be closed. 
See
   AGENTS.md for the full guidance.
   -->
   
   - [x] Yes (please specify the tool below)
   
   Generated-by: Opus 4.7 (for docs only)
   


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