[
https://issues.apache.org/jira/browse/FLINK-34263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martijn Visser updated FLINK-34263:
-----------------------------------
Fix Version/s: (was: 1.18.1)
> Converting double to decimal may fail
> -------------------------------------
>
> Key: FLINK-34263
> URL: https://issues.apache.org/jira/browse/FLINK-34263
> Project: Flink
> Issue Type: Bug
> Components: API / Core
> Affects Versions: 1.18.1
> Reporter: Caican Cai
> Priority: Minor
> Labels: pull-request-available
>
> Converting double to decimal fails. When the value is infinity, an error will
> be reported when converting double to decimal.
> {code:java}
> package org.apache.flink.table.examples.java.basics;
> import org.apache.flink.table.api.EnvironmentSettings;
> import org.apache.flink.table.api.TableEnvironment;
> /** The famous word count example that shows a minimal Flink SQL job in batch
> execution mode. */
> public final class WordCountSQLExample {
> public static void main(String[] args) throws Exception {
> // set up the Table API
> final EnvironmentSettings settings =
> EnvironmentSettings.newInstance().inBatchMode().build();
> final TableEnvironment tableEnv = TableEnvironment.create(settings);
> // execute a Flink SQL job and print the result locally
> tableEnv.executeSql(
> // define the aggregation
> "SELECT CAST(power(0,-3) AS DECIMAL)")
> .print();
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)