Dezhi Cai created FLINK-14970: --------------------------------- Summary: fDoomed 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 / Planner Affects Versions: 1.9.1, 1.9.0, 1.8.2 Reporter: Dezhi Cai Attachments: image-2019-11-27-16-51-00-150.png, image-2019-11-27-16-51-06-801.png
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)