[ https://issues.apache.org/jira/browse/FLINK-8136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther resolved FLINK-8136. --------------------------------- Resolution: Fixed Fix Version/s: 1.5.0 1.4.0 Fixed in 1.5: 5017c679c06de92bec6b094268d61ce5f3109b9e Fixed in 1.4: 28157962196cecb94a59720e92cbf3682418e821 > Cast exception error on Flink SQL when using DATE_FORMAT > -------------------------------------------------------- > > Key: FLINK-8136 > URL: https://issues.apache.org/jira/browse/FLINK-8136 > Project: Flink > Issue Type: Bug > Components: Table API & SQL > Affects Versions: 1.4.0 > Environment: Any environment > Reporter: David Marcos > Assignee: Timo Walther > Priority: Blocker > Fix For: 1.4.0, 1.5.0 > > > Due to the shading of joda time there is a exception when CodeGenerator try > to cast org.joda.time.format.DateTimeFormatter to > org.apache.flink.table.shaded.org.joda.time.format.DateTimeFormatter > This can be reproduce by using DATE_FORMAT temporal function in any flink SQL > Affected scala file: > ------------------------ > https://github.com/apache/flink/blob/master/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala > Affected method: > -------------------------- > addReusableDateFormatter > Affected code: > ----------------------- > val field = > s""" > |final org.joda.time.format.DateTimeFormatter $fieldTerm; > |""".stripMargin > Fastest solution: > ----------------------- > val field = > s""" > |final org.apache.flink.table.shaded.org.joda.time.format.DateTimeFormatter > $fieldTerm; > |""".stripMargin -- This message was sent by Atlassian JIRA (v6.4.14#64029)