ververica / flink-sql-gateway

Apache License 2.0
490 stars 187 forks source link

flink sql gateway seems not support to submit job for stream table #41

Open GANJE opened 4 years ago

GANJE commented 4 years ago

failed to submit a sql job for kafka stream table, exception: Cannot generate a valid execution plan for the given query. but i tried the same sql in Flink Client, it works well.

godfreyhe commented 4 years ago

what exception you get ? and how to submit a sql job ?

romainr commented 4 years ago

I got something like:

com.ververica.flink.table.gateway.utils.SqlExecutionException: Invalid SQL query.
    at com.ververica.flink.table.gateway.operation.SelectOperation.executeQueryInternal(SelectOperation.java:225) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.operation.SelectOperation.execute(SelectOperation.java:87) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.rest.session.Session.runStatement(Session.java:106) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.rest.handler.StatementExecuteHandler.handleRequest(StatementExecuteHandler.java:81) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.rest.handler.AbstractRestHandler.respondToRequest(AbstractRestHandler.java:77) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.rest.handler.AbstractHandler.channelRead0(AbstractHandler.java:178) [flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.rest.handler.AbstractHandler.channelRead0(AbstractHandler.java:75) [flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.runtime.rest.handler.router.RouterHandler.routed(RouterHandler.java:110) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.runtime.rest.handler.router.RouterHandler.channelRead0(RouterHandler.java:89) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.runtime.rest.handler.router.RouterHandler.channelRead0(RouterHandler.java:54) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.runtime.rest.FileUploadHandler.channelRead0(FileUploadHandler.java:174) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.runtime.rest.FileUploadHandler.channelRead0(FileUploadHandler.java:68) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1421) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [flink-dist_2.11-1.11.1.jar:1.11.1]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
Caused by: java.lang.IllegalStateException: Unable to instantiate java compiler
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.compile(JaninoRelMetadataProvider.java:433) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.load3(JaninoRelMetadataProvider.java:374) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.lambda$static$0(JaninoRelMetadataProvider.java:109) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.CacheLoader$FunctionToCacheLoader.load(CacheLoader.java:149) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache.get(LocalCache.java:3953) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.create(JaninoRelMetadataProvider.java:474) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.revise(JaninoRelMetadataProvider.java:487) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.RelMetadataQueryBase.revise(RelMetadataQueryBase.java:95) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:780) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(ReduceExpressionsRule.java:300) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:328) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:562) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:427) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:264) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:127) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:223) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:210) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkHepProgram.optimize(FlinkHepProgram.scala:69) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkHepRuleSetProgram.optimize(FlinkHepRuleSetProgram.scala:87) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram$$anonfun$optimize$1.apply(FlinkChainedProgram.scala:62) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram$$anonfun$optimize$1.apply(FlinkChainedProgram.scala:58) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.Iterator$class.foreach(Iterator.scala:891) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram.optimize(FlinkChainedProgram.scala:57) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.StreamCommonSubGraphBasedOptimizer.optimizeTree(StreamCommonSubGraphBasedOptimizer.scala:164) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.StreamCommonSubGraphBasedOptimizer.doOptimize(StreamCommonSubGraphBasedOptimizer.scala:80) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.CommonSubGraphBasedOptimizer.optimize(CommonSubGraphBasedOptimizer.scala:77) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.delegation.PlannerBase.optimize(PlannerBase.scala:279) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:164) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1264) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.translateAndClearBuffer(TableEnvironmentImpl.java:1256) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.getPipeline(StreamTableEnvironmentImpl.java:327) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at com.ververica.flink.table.gateway.context.ExecutionContext.lambda$createPipeline$1(ExecutionContext.java:235) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.context.ExecutionContext.wrapClassLoader(ExecutionContext.java:202) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.context.ExecutionContext.createPipeline(ExecutionContext.java:232) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.operation.SelectOperation.executeQueryInternal(SelectOperation.java:218) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    ... 46 more
Caused by: java.lang.ClassCastException: org.codehaus.janino.CompilerFactory cannot be cast to org.codehaus.commons.compiler.ICompilerFactory
    at org.codehaus.commons.compiler.CompilerFactoryFactory.getCompilerFactory(CompilerFactoryFactory.java:129) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.codehaus.commons.compiler.CompilerFactoryFactory.getDefaultCompilerFactory(CompilerFactoryFactory.java:79) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.compile(JaninoRelMetadataProvider.java:431) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.load3(JaninoRelMetadataProvider.java:374) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.lambda$static$0(JaninoRelMetadataProvider.java:109) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.CacheLoader$FunctionToCacheLoader.load(CacheLoader.java:149) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache.get(LocalCache.java:3953) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.calcite.shaded.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.create(JaninoRelMetadataProvider.java:474) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.JaninoRelMetadataProvider.revise(JaninoRelMetadataProvider.java:487) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.RelMetadataQueryBase.revise(RelMetadataQueryBase.java:95) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:780) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(ReduceExpressionsRule.java:300) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:328) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:562) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:427) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:264) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:127) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:223) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:210) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkHepProgram.optimize(FlinkHepProgram.scala:69) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkHepRuleSetProgram.optimize(FlinkHepRuleSetProgram.scala:87) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram$$anonfun$optimize$1.apply(FlinkChainedProgram.scala:62) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram$$anonfun$optimize$1.apply(FlinkChainedProgram.scala:58) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.Iterator$class.foreach(Iterator.scala:891) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104) ~[flink-dist_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.program.FlinkChainedProgram.optimize(FlinkChainedProgram.scala:57) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.StreamCommonSubGraphBasedOptimizer.optimizeTree(StreamCommonSubGraphBasedOptimizer.scala:164) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.StreamCommonSubGraphBasedOptimizer.doOptimize(StreamCommonSubGraphBasedOptimizer.scala:80) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.plan.optimize.CommonSubGraphBasedOptimizer.optimize(CommonSubGraphBasedOptimizer.scala:77) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.delegation.PlannerBase.optimize(PlannerBase.scala:279) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:164) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1264) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.api.internal.TableEnvironmentImpl.translateAndClearBuffer(TableEnvironmentImpl.java:1256) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.getPipeline(StreamTableEnvironmentImpl.java:327) ~[flink-table-blink_2.11-1.11.1.jar:1.11.1]
    at com.ververica.flink.table.gateway.context.ExecutionContext.lambda$createPipeline$1(ExecutionContext.java:235) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.context.ExecutionContext.wrapClassLoader(ExecutionContext.java:202) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.context.ExecutionContext.createPipeline(ExecutionContext.java:232) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    at com.ververica.flink.table.gateway.operation.SelectOperation.executeQueryInternal(SelectOperation.java:218) ~[flink-sql-gateway-0.2-SNAPSHOT.jar:?]
    ... 46 more
felixzh2020 commented 3 years ago

it looks like jar dependencies exist question

weilanying commented 2 years ago

I got something like: com.ververica.flink.table.gateway.utils.SqlExecutionException: Invalid SQL query. at com.ververica.flink.table.gateway.operation.SelectOperation.executeQueryInternal(SelectOperation.java:223) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.operation.SelectOperation.execute(SelectOperation.java:87) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.rest.session.Session.runStatement(Session.java:106) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.rest.handler.StatementExecuteHandler.handleRequest(StatementExecuteHandler.java:81) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.rest.handler.AbstractRestHandler.respondToRequest(AbstractRestHandler.java:77) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.rest.handler.AbstractHandler.channelRead0(AbstractHandler.java:178) [flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.rest.handler.AbstractHandler.channelRead0(AbstractHandler.java:75) [flink-sql-gateway-0.3-SNAPSHOT.jar:?] at org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.runtime.rest.handler.router.RouterHandler.routed(RouterHandler.java:115) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.runtime.rest.handler.router.RouterHandler.channelRead0(RouterHandler.java:94) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.runtime.rest.handler.router.RouterHandler.channelRead0(RouterHandler.java:55) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.runtime.rest.FileUploadHandler.channelRead0(FileUploadHandler.java:208) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.runtime.rest.FileUploadHandler.channelRead0(FileUploadHandler.java:69) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [flink-dist_2.12-1.13.0.jar:1.13.0] at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [flink-dist_2.12-1.13.0.jar:1.13.0] at java.lang.Thread.run(Thread.java:834) [?:?] Caused by: java.lang.IllegalArgumentException: Mismatch between configured runtime mode and actual runtime mode. Currently, the 'execution.runtime-mode' can only be set when instantiating the table environment. Subsequent changes are not supported. Please instantiate a new TableEnvironment if necessary. at org.apache.flink.table.planner.delegation.BatchPlanner.validateAndOverrideConfiguration(BatchPlanner.scala:173) ~[flink-table-blink_2.12-1.13.0.jar:1.13.0] at org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:162) ~[flink-table-blink_2.12-1.13.0.jar:1.13.0] at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1516) ~[flink-table_2.12-1.13.0.jar:1.13.0] at org.apache.flink.table.api.internal.TableEnvironmentImpl.translateAndClearBuffer(TableEnvironmentImpl.java:1508) ~[flink-table_2.12-1.13.0.jar:1.13.0] at org.apache.flink.table.api.bridge.java.internal.StreamTableEnvironmentImpl.getPipeline(StreamTableEnvironmentImpl.java:547) ~[flink-table_2.12-1.13.0.jar:1.13.0] at com.ververica.flink.table.gateway.context.ExecutionContext.lambda$createPipeline$1(ExecutionContext.java:235) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.context.ExecutionContext.wrapClassLoader(ExecutionContext.java:202) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.context.ExecutionContext.createPipeline(ExecutionContext.java:232) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?] at com.ververica.flink.table.gateway.operation.SelectOperation.executeQueryInternal(SelectOperation.java:216) ~[flink-sql-gateway-0.3-SNAPSHOT.jar:?]