You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "mingleizhang (JIRA)" <ji...@apache.org> on 2018/06/20 11:58:00 UTC
[jira] [Reopened] (FLINK-9614) Improve the error message for
Compiler#compile
[ https://issues.apache.org/jira/browse/FLINK-9614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mingleizhang reopened FLINK-9614:
---------------------------------
> Improve the error message for Compiler#compile
> ----------------------------------------------
>
> Key: FLINK-9614
> URL: https://issues.apache.org/jira/browse/FLINK-9614
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: mingleizhang
> Assignee: mingleizhang
> Priority: Major
>
> When the below sql has too long. Like
> case when .... case when .....
> when host in ('114.67.56.94','114.67.56.102','114.67.56.103','114.67.56.106','114.67.56.107','183.60.220.231','183.60.220.232','183.60.219.247','114.67.56.94','114.67.56.102','114.67.56.103','114.67.56.106','114.67.56.107','183.60.220.231','183.60.220.232','183.60.219.247','114.67.56.94','114.67.56.102','114.67.56.103','114.67.56.106','114.67.56.107','183.60.220.231','183.60.220.232','183.60.219.247') then 'condition'
> Then cause the {{StackOverflowError}}. And the current code is, but I would suggest prompt users add the {{-Xss 20m}} to solve this, instead of {{This is a bug......}}
> {code:java}
> trait Compiler[T] {
> @throws(classOf[CompileException])
> def compile(cl: ClassLoader, name: String, code: String): Class[T] = {
> require(cl != null, "Classloader must not be null.")
> val compiler = new SimpleCompiler()
> compiler.setParentClassLoader(cl)
> try {
> compiler.cook(code)
> } catch {
> case t: Throwable =>
> throw new InvalidProgramException("Table program cannot be compiled. " +
> "This is a bug. Please file an issue.", t)
> }
> compiler.getClassLoader.loadClass(name).asInstanceOf[Class[T]]
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)