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

   ## What is the purpose of the change
   
   The code generated by codegen references the class in the table-planner 
package, but the class in the table-planner package is hidden by 
table-planner-loader, so classloader cannot find it. 
   
   This pr moves the referred class 
`WatermarkGeneratorCodeGeneratorFunctionContextWrapper` from table-planner to 
table-runtime. 
   
   ## Brief change log
   
     - *Moves the class `WatermarkGeneratorCodeGeneratorFunctionContextWrapper` 
from table-planner to table-runtime*
     - *Deployments RPC transmits only the blob storage reference*
     - *TaskManagers retrieve the TaskInfo from the blob cache*
   
   
   ## Verifying this change
   
   This pr can't be verified by IT cases or UT cases because the bug only can 
be -reproduced without jar `table-planner`.
   So we need to verify this pr manually. The following steps can verify it.
   
   1. run a kafka and prepare some data
   You can start docker and run the test in flink-connector-kafka by debugging 
to do it:
   
https://github.com/apache/flink-connector-kafka/blob/abf4563e0342abe25dc28bb6b5457bb971381f61/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java#L488C17-L488C58
   
   Note: debug the code after executing preparing data:
   
https://github.com/apache/flink-connector-kafka/blob/abf4563e0342abe25dc28bb6b5457bb971381f61/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java#L531C9-L531C48
 
   
   2. run start-cluster to start flink
   3. run sql-client and then execute ddl
   Add computed column and watermark column like:
   ```
   ts AS COALESCE(`timestamp` ,CURRENT_TIMESTAMP),
   WATERMARK FOR ts AS ts - INTERVAL '5' SECOND
   ```
   4. run `select * from kafka_table`
   
   Before this fix, you will see an exception thrown. After this fix and 
re-build flink repo, re-run 2-4, then you can see the actual data from 
sql-client.
   
   ## 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? 


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