You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "cjh (Jira)" <ji...@apache.org> on 2022/06/22 06:10:00 UTC

[jira] [Comment Edited] (FLINK-28160) org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled.

    [ https://issues.apache.org/jira/browse/FLINK-28160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17557259#comment-17557259 ] 

cjh edited comment on FLINK-28160 at 6/22/22 6:09 AM:
------------------------------------------------------

[~twalthr] , OK . The original SQL query is as follows:

select
    dt_str,
    spcadmin.tenant_id as tenant_id,
    spcadmin.org_id as org_id,
    StringSortAgg(LISTAGG(spcadmin.admin_name,',')) as admin_name,
    spcadmin.room_id as rect_id,
    spcadmin.space_name as rect_name
from (
    select
        tenant_id,org_id,account_id,admin_name,
        room_id,space_name,
        ParseDebeziumTimestamp(start_date,'yyyy-MM-dd') as start_date,
        max(case when end_date is null then null else TO_DATE(ParseDebeziumTimestamp(end_date,'yyyy-MM-dd')) end) as end_date
    from admin
    where admin_name is not null
    and start_date is not null
    group by
        tenant_id,org_id,account_id,admin_name,
        room_id,space_name,
        ParseDebeziumTimestamp(start_date,'yyyy-MM-dd') as start_date
) spcadmin
join comm on IntToDate(comm.whole_date) >= spcadmin.start_date 
    and IntToDate(comm.whole_date) < (case when spcadmin.end_date is null then TO_DATE('2023-01-01') else spcadmin.end_date end)
group by
    dt_str,
    spcadmin.tenant_id,
    spcadmin.org_id,
    spcadmin.room_id,
    spcadmin.space_name


was (Author: JIRAUSER291309):
[~twalthr] , The original SQL query is as follows:


select
    dt_str,
    spcadmin.tenant_id as tenant_id,
    spcadmin.org_id as org_id,
    StringSortAgg(LISTAGG(spcadmin.admin_name,',')) as admin_name,
    spcadmin.room_id as rect_id,
    spcadmin.space_name as rect_name
from (
    select
        tenant_id,org_id,account_id,admin_name,
        room_id,space_name,
        ParseDebeziumTimestamp(start_date,'yyyy-MM-dd') as start_date,
        max(case when end_date is null then null else TO_DATE(ParseDebeziumTimestamp(end_date,'yyyy-MM-dd')) end) as end_date
    from admin
    where admin_name is not null
    and start_date is not null
    group by
        tenant_id,org_id,account_id,admin_name,
        room_id,space_name,
        ParseDebeziumTimestamp(start_date,'yyyy-MM-dd') as start_date
) spcadmin
join comm on IntToDate(comm.whole_date) >= spcadmin.start_date 
    and IntToDate(comm.whole_date) < (case when spcadmin.end_date is null then TO_DATE('2023-01-01') else spcadmin.end_date end)
group by
    dt_str,
    spcadmin.tenant_id,
    spcadmin.org_id,
    spcadmin.room_id,
    spcadmin.space_name

> org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled. 
> ---------------------------------------------------------------------------------------
>
>                 Key: FLINK-28160
>                 URL: https://issues.apache.org/jira/browse/FLINK-28160
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Runtime
>    Affects Versions: 1.15.0
>         Environment: flink 1.15.0
>            Reporter: cjh
>            Priority: Major
>
> 2022-06-21 11:29:34,914 WARN  org.apache.flink.table.runtime.generated.GeneratedClass      [] - Failed to compile split code, falling back to original code
> org.apache.flink.util.FlinkRuntimeException: org.apache.flink.api.common.InvalidProgramException: {color:#FF0000}Table program cannot be compiled{color}. This is a bug. Please file an issue.
>     at org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:94) ~[flink-table-runtime-1.15.0.jar:1.15.0]
>     at org.apache.flink.table.runtime.generated.GeneratedClass.compile(GeneratedClass.java:97) ~[flink-table-runtime-1.15.0.jar:1.15.0]
>     at org.apache.flink.table.runtime.generated.GeneratedClass.newInstance(GeneratedClass.java:68) ~[flink-table-runtime-1.15.0.jar:1.15.0]
>     at org.apache.flink.table.runtime.operators.aggregate.MiniBatchLocalGroupAggFunction.open(MiniBatchLocalGroupAggFunction.java:59) ~[flink-table-runtime-1.15.0.jar:1.15.0]
>     at org.apache.flink.table.runtime.operators.bundle.AbstractMapBundleOperator.open(AbstractMapBundleOperator.java:82) ~[flink-table-runtime-1.15.0.jar:1.15.0]
>     at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:107) ~[flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:700) ~[flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55) ~[flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:676) ~[flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:643) ~[flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:948) [flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:917) [flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:741) [flink-dist-1.15.0.jar:1.15.0]
>     at org.apache.flink.runtime.taskmanager.Task.run(Task.java:563) [flink-dist-1.15.0.jar:1.15.0]
>     at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
> Caused by: org.apache.flink.shaded.guava30.com.google.common.util.concurrent.UncheckedExecutionException: org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled. This is a bug. Please file an issue.
>     at org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051) ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
>     at org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache.get(LocalCache.java:3962) ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
>     at org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4859) ~[flink-shaded-guava-30.1.1-jre-15.0.jar:30.1.1-jre-15.0]
>     at org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:92) ~[flink-table-runtime-1.15.0.jar:1.15.0]
>     ... 14 more



--
This message was sent by Atlassian Jira
(v8.20.7#820007)