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

   This re-opens the work from #27507, which was auto-closed by the stale bot 
due to inactivity. Rebased onto the latest `master`.
   
   ## What is the purpose of the change
   [FLINK-39014](https://issues.apache.org/jira/browse/FLINK-39014)
   When creating a `StreamTableEnvironment` using 
`StreamTableEnvironment.create(env)` where the `StreamExecutionEnvironment` is 
configured with `RUNTIME_MODE=BATCH`, the planner was incorrectly created in 
`STREAMING` mode, causing a mismatch between execution mode and planner mode.
   
   ## Brief change log
   The fix ensures that `EnvironmentSettings` inherits the configuration from 
`StreamExecutionEnvironment` by calling 
`.withConfiguration`(`executionEnvironment.getConfiguration()`) when creating 
default environment settings. This maintains consistency between the execution 
mode and planner mode throughout the system. 
     - **StreamTableEnvironment.java**: Modified 
`create`(`StreamExecutionEnvironment`) to pass the execution environment's 
configuration to EnvironmentSettings, ensuring the runtime mode is properly 
inherited          
     - **WatermarkExampleITCase.java**: Added integration test to verify 
watermark handling works correctly in both batch and streaming execution modes  
   
   ## Verifying this change
   This change is covered by new integration tests in `WatermarkExampleITCase`.
   
   ## 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