Timo Walther created FLINK-20942:
------------------------------------
Summary: Digest of FLOAT literals throws UnsupportedOperationException
Key: FLINK-20942
URL:
https://issues.apache.org/jira/browse/FLINK-20942 Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Reporter: Timo Walther
The recent refactoring of Calcite's digests might have caused a regression for FLOAT literals. {{org.apache.calcite.rex.RexLiteral#appendAsJava}} throws a UnsupportedOperationException for the following query:
{code}
def main(args: Array[String]): Unit = {
val env = StreamExecutionEnvironment.getExecutionEnvironment
val source = env.fromElements(
(1.0f, 11.0f, 12.0f),
(2.0f, 21.0f, 22.0f),
(3.0f, 31.0f, 32.0f),
(4.0f, 41.0f, 42.0f),
(5.0f, 51.0f, 52.0f)
)
val settings = EnvironmentSettings.newInstance()
.inStreamingMode()
.useBlinkPlanner()
.build()
val tEnv = StreamTableEnvironment.create(env, settings)
tEnv.createTemporaryView("myTable", source, $("id"), $("f1"), $("f2"))
val query =
"""
|select * from myTable where id in (1.0, 2.0, 3.0)
|""".stripMargin
tEnv.executeSql(query).print()
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)