liuzhiyong created FLINK-29445:
----------------------------------
Summary: When the decimal table column field is printed,program is
error
Key: FLINK-29445
URL: https://issues.apache.org/jira/browse/FLINK-29445
Project: Flink
Issue Type: Bug
Components: Table SQL / API, Table SQL / Runtime
Affects Versions: 1.12.0
Environment: <flink.version>1.12.0</flink.version>
flink-table-api-java-bridge_2.11
flink-table-planner_2.11
flink-streaming-scala_2.11
Reporter: liuzhiyong
Fix For: 1.12.0
Attachments: pom.xml
runtime is java
error code:
tEnv.executeSql("select `openScore` from demo").print();
openScore field is BigDecimal
error log is:
Exception in thread "main" java.lang.ClassCastException:
org.apache.flink.table.types.logical.LegacyTypeInformationType cannot be cast
to org.apache.flink.table.types.logical.DecimalType
at
org.apache.flink.table.utils.PrintUtils.columnWidthsByType(PrintUtils.java:264)
at
org.apache.flink.table.utils.PrintUtils.printAsTableauForm(PrintUtils.java:127)
at
org.apache.flink.table.api.internal.TableResultImpl.print(TableResultImpl.java:149)
at com.mask.maintest.TestTableEnv.main(TestTableEnv.java:74)
source code position:
class : PrintUtils
line: 177
len = ((DecimalType)type).getPrecision() + 2;
--
This message was sent by Atlassian Jira
(v8.20.10#820010)