twalthr commented on a change in pull request #15303:
URL: https://github.com/apache/flink/pull/15303#discussion_r600484494



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/PlannerBase.scala
##########
@@ -455,16 +455,21 @@ abstract class PlannerBase(
    * the configuration before planner do optimization with [[ModifyOperation]] 
or other works.
    */
   protected def validateAndOverrideConfiguration(): Unit = {
-    if 
(!config.getConfiguration.get(TableConfigOptions.TABLE_PLANNER).equals(PlannerType.BLINK))
 {
+    val configuration = config.getConfiguration
+    if 
(!configuration.get(TableConfigOptions.TABLE_PLANNER).equals(PlannerType.BLINK))
 {
       throw new IllegalArgumentException(
         "Mismatch between configured planner and actual planner. " +
           "Currently, the 'table.planner' can only be set when instantiating 
the " +
           "table environment. Subsequent changes are not supported. " +
           "Please instantiate a new TableEnvironment if necessary.");
     }
 
+    // Add a query start time to TableConfig, this config is only used 
internal,
+    // this config will be used by temporal functions like CURRENT_TIMESTAMP.
+    configuration.setLong("__table.query-start.epoch-time__", 
System.currentTimeMillis())

Review comment:
       Is there a possibility of removing the flag again after submission? 
Otherwise I think this approach is good enough to have query-start semantics. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to