macdoor615 created FLINK-27248:
----------------------------------

             Summary: can not call function collect_set() in hive module
                 Key: FLINK-27248
                 URL: https://issues.apache.org/jira/browse/FLINK-27248
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / Hive
    Affects Versions: 1.15.0
         Environment: flink 1.15.0-rc2
            Reporter: macdoor615
             Fix For: 1.15.0


 
 excute the following sql in sql-client.sh 
{code:java}
    select
        alm.k_id,
        alm.k_id id,
        alm.EventTime,
        collect_set(json_object('po' value pi.po)) pilist,
        LOCALTIMESTAMP imp_time,
        alm.rowtime,
        alm.raw_rowtime
      from prod_kafka.cf_alarm_normcode
              /*+ OPTIONS(
          'scan.startup.mode' = 'timestamp',
          'scan.startup.timestamp-millis' = '1615478400000') */ as alm
      inner join prod_mysql_bnpmp.f_bv_productinstance_usr FOR SYSTEM_TIME AS 
OF alm.proctime AS pi
        on pi.normcode=alm.normcode and pi.state = '在用'
      group by
      session(proctime(), interval '1' seconds),
      alm.k_id,
      alm.EventTime,alm.rowtime,alm.raw_rowtime;{code}
get error in taskmanager log. When I substitute collect_set with  function 
listagg(), there is no error.
 
{code:java}
2022-04-14 16:28:47 org.apache.flink.runtime.JobException: Recovery is 
suppressed by FixedDelayRestartBackoffTimeStrategy(maxNumberRestartAttempts=3, 
backoffTimeMS=15000) at 
org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.handleFailure(ExecutionFailureHandler.java:138)
 at 
org.apache.flink.runtime.executiongraph.failover.flip1.ExecutionFailureHandler.getFailureHandlingResult(ExecutionFailureHandler.java:82)
 at 
org.apache.flink.runtime.scheduler.DefaultScheduler.handleTaskFailure(DefaultScheduler.java:301)
 at 
org.apache.flink.runtime.scheduler.DefaultScheduler.maybeHandleTaskFailure(DefaultScheduler.java:291)
 at 
org.apache.flink.runtime.scheduler.DefaultScheduler.updateTaskExecutionStateInternal(DefaultScheduler.java:282)
 at 
org.apache.flink.runtime.scheduler.SchedulerBase.updateTaskExecutionState(SchedulerBase.java:739)
 at 
org.apache.flink.runtime.scheduler.SchedulerNG.updateTaskExecutionState(SchedulerNG.java:78)
 at 
org.apache.flink.runtime.jobmaster.JobMaster.updateTaskExecutionState(JobMaster.java:443)
 at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498) at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:304)
 at 
org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83)
 at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:302)
 at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:217)
 at 
org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:78)
 at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:163)
 at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24) at 
akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20) at 
scala.PartialFunction.applyOrElse(PartialFunction.scala:123) at 
scala.PartialFunction.applyOrElse$(PartialFunction.scala:122) at 
akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20) at 
scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) at 
scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) at 
scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) at 
akka.actor.Actor.aroundReceive(Actor.scala:537) at 
akka.actor.Actor.aroundReceive$(Actor.scala:535) at 
akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) at 
akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) at 
akka.actor.ActorCell.invoke(ActorCell.scala:548) at 
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) at 
akka.dispatch.Mailbox.run(Mailbox.scala:231) at 
akka.dispatch.Mailbox.exec(Mailbox.scala:243) at 
java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at 
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at 
java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) 
Caused by: java.lang.RuntimeException: Could not instantiate generated class 
'GroupingWindowAggsHandler$173' at 
org.apache.flink.table.runtime.generated.GeneratedClass.newInstance(GeneratedClass.java:74)
 at 
org.apache.flink.table.runtime.operators.window.AggregateWindowOperator.compileGeneratedCode(AggregateWindowOperator.java:148)
 at 
org.apache.flink.table.runtime.operators.window.WindowOperator.open(WindowOperator.java:274)
 at 
org.apache.flink.table.runtime.operators.window.AggregateWindowOperator.open(AggregateWindowOperator.java:139)
 at 
org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:107)
 at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:700)
 at 
org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55)
 at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:676)
 at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:643)
 at 
org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:948)
 at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:917) 
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:741) at 
org.apache.flink.runtime.taskmanager.Task.run(Task.java:563) at 
java.lang.Thread.run(Thread.java:748) Caused by: 
org.apache.flink.util.FlinkRuntimeException: 
org.apache.flink.api.common.InvalidProgramException: Table program cannot be 
compiled. This is a bug. Please file an issue. at 
org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:94)
 at 
org.apache.flink.table.runtime.generated.GeneratedClass.compile(GeneratedClass.java:101)
 at 
org.apache.flink.table.runtime.generated.GeneratedClass.newInstance(GeneratedClass.java:68)
 ... 13 more 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)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache.get(LocalCache.java:3962)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4859)
 at 
org.apache.flink.table.runtime.generated.CompileUtils.compile(CompileUtils.java:92)
 ... 15 more Caused by: org.apache.flink.api.common.InvalidProgramException: 
Table program cannot be compiled. This is a bug. Please file an issue. at 
org.apache.flink.table.runtime.generated.CompileUtils.doCompile(CompileUtils.java:107)
 at 
org.apache.flink.table.runtime.generated.CompileUtils.lambda$compile$0(CompileUtils.java:92)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4864)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
 at 
org.apache.flink.shaded.guava30.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
 ... 18 more Caused by: org.codehaus.commons.compiler.CompileException: Line 
15, Column 28: Cannot determine simple type name "org" at 
org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12211) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6833) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6594) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:6607) at 
org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:6573) at 
org.codehaus.janino.UnitCompiler.access$13900(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$22$1.visitReferenceType(UnitCompiler.java:6481)
 at 
org.codehaus.janino.UnitCompiler$22$1.visitReferenceType(UnitCompiler.java:6476)
 at org.codehaus.janino.Java$ReferenceType.accept(Java.java:3928) at 
org.codehaus.janino.UnitCompiler$22.visitType(UnitCompiler.java:6476) at 
org.codehaus.janino.UnitCompiler$22.visitType(UnitCompiler.java:6469) at 
org.codehaus.janino.Java$ReferenceType.accept(Java.java:3927) at 
org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:6469) at 
org.codehaus.janino.UnitCompiler.access$1300(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$25.getType(UnitCompiler.java:8271) at 
org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:6873) at 
org.codehaus.janino.UnitCompiler.access$14400(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$22$2$1.visitFieldAccess(UnitCompiler.java:6499)
 at 
org.codehaus.janino.UnitCompiler$22$2$1.visitFieldAccess(UnitCompiler.java:6494)
 at org.codehaus.janino.Java$FieldAccess.accept(Java.java:4310) at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6494) at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6490) at 
org.codehaus.janino.Java$Lvalue.accept(Java.java:4148) at 
org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6490) at 
org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6469) at 
org.codehaus.janino.Java$Rvalue.accept(Java.java:4116) at 
org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:6469) at 
org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:6855) at 
org.codehaus.janino.UnitCompiler.access$14200(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$22$2$1.visitAmbiguousName(UnitCompiler.java:6497)
 at 
org.codehaus.janino.UnitCompiler$22$2$1.visitAmbiguousName(UnitCompiler.java:6494)
 at org.codehaus.janino.Java$AmbiguousName.accept(Java.java:4224) at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6494) at 
org.codehaus.janino.UnitCompiler$22$2.visitLvalue(UnitCompiler.java:6490) at 
org.codehaus.janino.Java$Lvalue.accept(Java.java:4148) at 
org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6490) at 
org.codehaus.janino.UnitCompiler$22.visitRvalue(UnitCompiler.java:6469) at 
org.codehaus.janino.Java$Rvalue.accept(Java.java:4116) at 
org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:6469) at 
org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java:9026) at 
org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:5062) at 
org.codehaus.janino.UnitCompiler.access$9100(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$16.visitMethodInvocation(UnitCompiler.java:4423)
 at 
org.codehaus.janino.UnitCompiler$16.visitMethodInvocation(UnitCompiler.java:4396)
 at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:5073) at 
org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4396) at 
org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5662) at 
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:3783) at 
org.codehaus.janino.UnitCompiler.access$5900(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:3762)
 at 
org.codehaus.janino.UnitCompiler$13.visitMethodInvocation(UnitCompiler.java:3734)
 at org.codehaus.janino.Java$MethodInvocation.accept(Java.java:5073) at 
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3734) at 
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2360) at 
org.codehaus.janino.UnitCompiler.access$1800(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$6.visitExpressionStatement(UnitCompiler.java:1494)
 at 
org.codehaus.janino.UnitCompiler$6.visitExpressionStatement(UnitCompiler.java:1487)
 at org.codehaus.janino.Java$ExpressionStatement.accept(Java.java:2874) at 
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1487) at 
org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1567) at 
org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3388) at 
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1357) 
at 
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1330) 
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:822) at 
org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:432) at 
org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:215) at 
org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:411)
 at 
org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:406)
 at 
org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:1414) 
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:406) at 
org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:378) at 
org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:237) at 
org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:465)
 at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:216) at 
org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:207) at 
org.codehaus.commons.compiler.Cookable.cook(Cookable.java:80) at 
org.codehaus.commons.compiler.Cookable.cook(Cookable.java:75) at 
org.apache.flink.table.runtime.generated.CompileUtils.doCompile(CompileUtils.java:104)
 ... 24 more{code}
 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to