matriv commented on a change in pull request #17985:
URL: https://github.com/apache/flink/pull/17985#discussion_r760901660



##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/CodeGeneratorContext.scala
##########
@@ -591,6 +591,18 @@ class CodeGeneratorContext(val tableConfig: TableConfig) {
     fieldTerm
   }
 
+  /**
+    * Adds a reusable boolean LegacyCastBehaviour var to the member ara of the 
generated class.
+    */
+  def addReusableLegacyCastBehaviour(): Boolean = {
+    val legacyCastBehaviour = tableConfig.getLegacyCastBehaviour
+    val stmt =
+      s"""private static final boolean $DEFAULT_LEGACY_CAST_BEHAVIOUR 
="$legacyCastBehaviour";
+      """.stripMargin
+    addReusableMember(stmt)
+    legacyCastBehaviour
+  }

Review comment:
       Don't know, I thought to have there prepared just in case, I can remove 
as well if you think it's better.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to