[
https://issues.apache.org/jira/browse/FLINK-19488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17336077#comment-17336077
]
Flink Jira Bot commented on FLINK-19488:
----------------------------------------
This issue was labeled "stale-major" 7 ago and has not received any updates so
it is being deprioritized. If this ticket is actually Major, please raise the
priority and ask a committer to assign you the issue or revive the public
discussion.
> Failed compilation of generated class
> -------------------------------------
>
> Key: FLINK-19488
> URL: https://issues.apache.org/jira/browse/FLINK-19488
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Runtime
> Affects Versions: 1.11.1
> Environment: Flink version: 1.11.1
>
> Reporter: Satyam Shekhar
> Priority: Major
> Labels: stale-major
> Attachments: code.java
>
>
> I have a table T0 with the following schema -
>
> {code:java}
> root
> |-- C0: BIGINT
> |-- C1: STRING
> |-- blaze_itime: TIMESTAMP(3)
> {code}
>
> The following SQL query fails for the above table -
> {code:java}
> SELECT A.C0 AS output, A.C1 AS dim0 FROM T0 AS A WHERE (A.blaze_itime BETWEEN
> NOW() - INTERVAL '10' MINUTE AND NOW());
> {code}
>
> The generated code for the above query tries to assign a long value to
> timestamp type and fails to compile with the following exception -
> {code:java}
> java.lang.RuntimeException: Could not instantiate generated class
> 'BatchCalc$14'java.lang.RuntimeException: Could not instantiate generated
> class 'BatchCalc$14' at
> org.apache.flink.table.runtime.generated.GeneratedClass.newInstance(GeneratedClass.java:67)
> at
> org.apache.flink.table.runtime.operators.CodeGenOperatorFactory.createStreamOperator(CodeGenOperatorFactory.java:40)
> at
> org.apache.flink.streaming.api.operators.StreamOperatorFactoryUtil.createOperator(StreamOperatorFactoryUtil.java:70)
> at
> org.apache.flink.streaming.runtime.tasks.OperatorChain.createChainedOperator(OperatorChain.java:470)
> at
> ...
> Caused by: org.codehaus.commons.compiler.CompileException: Line 55, Column
> 21: Assignment conversion not possible from type "long" to type
> "org.apache.flink.table.data.TimestampData"Caused by:
> org.codehaus.commons.compiler.CompileException: Line 55, Column 21:
> Assignment conversion not possible from type "long" to type
> "org.apache.flink.table.data.TimestampData" at
> org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12124) at
> org.codehaus.janino.UnitCompiler.assignmentConversion(UnitCompiler.java:10975)
> at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:3788) at
> org.codehaus.janino.UnitCompiler.access$6100(UnitCompiler.java:215)
> {code}
>
> The generated code is added as an attachment to the issue.
>
> The Environment has the following configuration parameters -
> {code:java}
> env.setParallelism(Integer.getInteger("flinkParallelism", 2));
> env.getConfig().enableObjectReuse();
> var settings = EnvironmentSettings.newInstance()
> .useBlinkPlanner()
> .inBatchMode()
> .build();
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)