[ https://issues.apache.org/jira/browse/FLINK-14970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dezhi Cai updated FLINK-14970: ------------------------------ Description: scala pattern matching can't handle "NaN","NegativeInfinity " etc. in GenerateUtils, CodeGenerator, some code logic fall into this issue, please refer to the screenshot for details. {code:java} def main(args: Array[String]): Unit = { val floatVaue = Float.NaN floatVaue match { case Float.NaN => println("Float.NaN") case Float.NegativeInfinity => println("Float.NegativeInfinity") case _ => println("not match") } } will output: not match {code} org.apache.flink.table.planner.codegen.GenerateUtils !image-2019-11-27-16-51-06-801.png|width=723,height=257! org.apache.flink.table.codegen.CodeGenerator !image-2019-11-27-16-51-00-150.png|width=727,height=158! was: scala pattern matching can't handle "NaN","NegativeInfinity " etc. in GenerateUtils, CodeGenerator, some code logic fall into this issue, please refer to the screenshot for details. {code:java} def main(args: Array[String]): Unit = { val floatVaue = Float.NaN floatVaue match { case Float.NaN => println("Float.NaN") case Float.NegativeInfinity => println("Float.NegativeInfinity") case _ => println("not match") } } will output: not match{code} org.apache.flink.table.planner.codegen.GenerateUtils !image-2019-11-27-16-51-06-801.png|width=723,height=257! org.apache.flink.table.codegen.CodeGenerator !image-2019-11-27-16-51-00-150.png|width=727,height=158! > Doomed test for equality to NaN > ------------------------------- > > Key: FLINK-14970 > URL: https://issues.apache.org/jira/browse/FLINK-14970 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner > Affects Versions: 1.8.2, 1.9.0, 1.9.1 > Reporter: Dezhi Cai > Priority: Critical > Labels: pull-request-available > Attachments: image-2019-11-27-16-51-00-150.png, > image-2019-11-27-16-51-06-801.png > > Time Spent: 10m > Remaining Estimate: 0h > > scala pattern matching can't handle "NaN","NegativeInfinity " etc. > in GenerateUtils, CodeGenerator, some code logic fall into this issue, please > refer to > the screenshot for details. > {code:java} > def main(args: Array[String]): Unit = { > val floatVaue = Float.NaN > floatVaue match { > case Float.NaN => println("Float.NaN") > case Float.NegativeInfinity => println("Float.NegativeInfinity") > case _ => println("not match") > } > } > will output: not match > {code} > > org.apache.flink.table.planner.codegen.GenerateUtils > !image-2019-11-27-16-51-06-801.png|width=723,height=257! > org.apache.flink.table.codegen.CodeGenerator > !image-2019-11-27-16-51-00-150.png|width=727,height=158! -- This message was sent by Atlassian Jira (v8.3.4#803005)