lincoln-lil opened a new pull request, #28750:
URL: https://github.com/apache/flink/pull/28750

   ## What is the purpose of the change
   
   This pull request fixes an issue where CREATE TABLE ... LIKE cannot resolve 
an inherited metadata column when validating a newly declared watermark.
   
   MergeTableLikeUtil adds inherited metadata columns to the merged schema but 
does not register their types in the field mapping used to validate watermark 
definitions. As a result, declaring a watermark on an
     inherited metadata timestamp fails because the rowtime field cannot be 
resolved.
   
   ## Brief change log
   - Register the types of inherited metadata columns when building the merged 
table schema.
   - Add unit coverage for declaring a watermark on an inherited metadata 
column.
   - Add a stream plan test covering CREATE TABLE ... LIKE with EXCLUDING 
WATERMARKS and a new watermark defined as:
   WATERMARK FOR `opts` AS `opts` - INTERVAL '5' SECOND
   
   ## Verifying this change
   This change added tests and can be verified as follows:
   - Added 
MergeTableLikeUtilTest#mergeWatermarkReferencingInheritedMetadataColumn to 
verify that inherited metadata columns are available during watermark 
validation.
   - Added 
TableScanTest#testCreateTableLikeWithWatermarkReferencingMetadataColumn to 
verify the complete DDL-to-plan flow and confirm that opts becomes the rowtime 
attribute.
   
   ## 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): (no)
     - 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? (no)
     - If yes, how is the feature documented? (not applicable)


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