[jira] [Commented] (HIVE-16074) Parser can not deal with complex sql
[ https://issues.apache.org/jira/browse/HIVE-16074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389325#comment-16389325 ] 靳峥 commented on HIVE-16074: --- thanks [~pxiong] > Parser can not deal with complex sql > > > Key: HIVE-16074 > URL: https://issues.apache.org/jira/browse/HIVE-16074 > Project: Hive > Issue Type: Bug > Components: Parser >Affects Versions: 2.1.1 >Reporter: 靳峥 >Assignee: Pengcheng Xiong >Priority: Major > Fix For: 2.3.0 > > Original Estimate: 12h > Remaining Estimate: 12h > > Parser will stuck when parsing the sql into ast, eg: > select > intType,floatType,stringType,varchar32Type,byteType,shortType,dateType,timestampType,longType > , max(intType | 0) from orctest where > ((1=2)) and ((1=1))) or (((2=2)) and > ((1=2 and (((1=1)) or ((0=0 or (((1=0)) or ((1=2 or (((1=1)) or > ((0=0 or (((1=1)) and ((0=0 or (((2=2)) or ((2=2 and (((2=2)) or > ((2=2 and (((2=2)) or ((1=2 or (((0=0)) and ((1=0 or (((1=1)) and > ((1=2 or (((1=1)) and ((2=2 or (((1=2)) and ((1=1 or (((1=1)) and > ((2=2 or (((1=1)) or ((1=1 and (((0=0)) and ((0=0 or (((0=0)) or > ((1=2 and (((1=2)) and ((1=1 and (((0=0)) or ((2=2 or (((1=2)) or > ((2=2 and (((0=0)) and ((1=2 or (((1=2)) or ((1=0 or (((2=2)) or > ((1=0 or (((2=2)) or ((1=2 or (((1=2)) or ((1=1 and (((1=2)) or > ((1=2 and (((1=0)) or ((2=2 and (((2=2)) or ((1=0 and (((1=2)) or > ((1=1 and (((1=2)) or ((1=2 and (((2=2)) and ((1=0 and (((2=2)) > or ((1=1 or (((0=0)) and ((1=1 and (((2=2)) or ((1=2 and (((1=2)) > or ((0=0 or (((1=0)) and ((1=1 or (((1=1)) and ((1=2))) group by > intType,floatType,stringType,varchar32Type,byteType,shortType,dateType,timestampType,longType; > The jvm of Server was working fine, with continues minor gc. > The cpu kept 100%. > It means the java logic generated by antlr is too complex. > The way to solve the problem may be optimize the syntax file or update the > version of antlr. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-16074) Parser can not deal with complex sql
[ https://issues.apache.org/jira/browse/HIVE-16074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890764#comment-15890764 ] Pengcheng Xiong commented on HIVE-16074: I tried the following query {code} select key,value from src where ((1=2)) and ((1=1))) or (((2=2)) and ((1=2 and (((1=1)) or ((0=0 or (((1=0)) or ((1=2 or (((1=1)) or ((0=0 or (((1=1)) and ((0=0 or (((2=2)) or ((2=2 and (((2=2)) or ((2=2 and (((2=2)) or ((1=2 or (((0=0)) and ((1=0 or (((1=1)) and ((1=2 or (((1=1)) and ((2=2 or (((1=2)) and ((1=1 or (((1=1)) and ((2=2 or (((1=1)) or ((1=1 and (((0=0)) and ((0=0 or (((0=0)) or ((1=2 and (((1=2)) and ((1=1 and (((0=0)) or ((2=2 or (((1=2)) or ((2=2 and (((0=0)) and ((1=2 or (((1=2)) or ((1=0 or (((2=2)) or ((1=0 or (((2=2)) or ((1=2 or (((1=2)) or ((1=1 and (((1=2)) or ((1=2 and (((1=0)) or ((2=2 and (((2=2)) or ((1=0 and (((1=2)) or ((1=1 and (((1=2)) or ((1=2 and (((2=2)) and ((1=0 and (((2=2)) or ((1=1 or (((0=0)) and ((1=1 and (((2=2)) or ((1=2 and (((1=2)) or ((0=0 or (((1=0)) and ((1=1 or (((1=1)) and ((1=2))) group by key, value; {code} it is reproducible without HIVE-15388. After I applied the patch, it is resolved. [~jinzheng], Please upgrade to the latest master. > Parser can not deal with complex sql > > > Key: HIVE-16074 > URL: https://issues.apache.org/jira/browse/HIVE-16074 > Project: Hive > Issue Type: Bug > Components: Parser >Affects Versions: 2.1.1 >Reporter: 靳峥 > Fix For: 2.2.0 > > Original Estimate: 12h > Remaining Estimate: 12h > > Parser will stuck when parsing the sql into ast, eg: > select > intType,floatType,stringType,varchar32Type,byteType,shortType,dateType,timestampType,longType > , max(intType | 0) from orctest where > ((1=2)) and ((1=1))) or (((2=2)) and > ((1=2 and (((1=1)) or ((0=0 or (((1=0)) or ((1=2 or (((1=1)) or > ((0=0 or (((1=1)) and ((0=0 or (((2=2)) or ((2=2 and (((2=2)) or > ((2=2 and (((2=2)) or ((1=2 or (((0=0)) and ((1=0 or (((1=1)) and > ((1=2 or (((1=1)) and ((2=2 or (((1=2)) and ((1=1 or (((1=1)) and > ((2=2 or (((1=1)) or ((1=1 and (((0=0)) and ((0=0 or (((0=0)) or > ((1=2 and (((1=2)) and ((1=1 and (((0=0)) or ((2=2 or (((1=2)) or > ((2=2 and (((0=0)) and ((1=2 or (((1=2)) or ((1=0 or (((2=2)) or > ((1=0 or (((2=2)) or ((1=2 or (((1=2)) or ((1=1 and (((1=2)) or > ((1=2 and (((1=0)) or ((2=2 and (((2=2)) or ((1=0 and (((1=2)) or > ((1=1 and (((1=2)) or ((1=2 and (((2=2)) and ((1=0 and (((2=2)) > or ((1=1 or (((0=0)) and ((1=1 and (((2=2)) or ((1=2 and (((1=2)) > or ((0=0 or (((1=0)) and ((1=1 or (((1=1)) and ((1=2))) group by > intType,floatType,stringType,varchar32Type,byteType,shortType,dateType,timestampType,longType; > The jvm of Server was working fine, with continues minor gc. > The cpu kept 100%. > It means the java logic generated by antlr is too complex. > The way to solve the problem may be optimize the syntax file or update the > version of antlr. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16074) Parser can not deal with complex sql
[ https://issues.apache.org/jira/browse/HIVE-16074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890062#comment-15890062 ] Gopal V commented on HIVE-16074: This might be a dup of HIVE-15388 > Parser can not deal with complex sql > > > Key: HIVE-16074 > URL: https://issues.apache.org/jira/browse/HIVE-16074 > Project: Hive > Issue Type: Bug > Components: Parser >Affects Versions: 2.1.1 >Reporter: 靳峥 > Fix For: 2.2.0 > > Original Estimate: 12h > Remaining Estimate: 12h > > Parser will stuck when parsing the sql into ast, eg: > select > intType,floatType,stringType,varchar32Type,byteType,shortType,dateType,timestampType,longType > , max(intType | 0) from orctest where > ((1=2)) and ((1=1))) or (((2=2)) and > ((1=2 and (((1=1)) or ((0=0 or (((1=0)) or ((1=2 or (((1=1)) or > ((0=0 or (((1=1)) and ((0=0 or (((2=2)) or ((2=2 and (((2=2)) or > ((2=2 and (((2=2)) or ((1=2 or (((0=0)) and ((1=0 or (((1=1)) and > ((1=2 or (((1=1)) and ((2=2 or (((1=2)) and ((1=1 or (((1=1)) and > ((2=2 or (((1=1)) or ((1=1 and (((0=0)) and ((0=0 or (((0=0)) or > ((1=2 and (((1=2)) and ((1=1 and (((0=0)) or ((2=2 or (((1=2)) or > ((2=2 and (((0=0)) and ((1=2 or (((1=2)) or ((1=0 or (((2=2)) or > ((1=0 or (((2=2)) or ((1=2 or (((1=2)) or ((1=1 and (((1=2)) or > ((1=2 and (((1=0)) or ((2=2 and (((2=2)) or ((1=0 and (((1=2)) or > ((1=1 and (((1=2)) or ((1=2 and (((2=2)) and ((1=0 and (((2=2)) > or ((1=1 or (((0=0)) and ((1=1 and (((2=2)) or ((1=2 and (((1=2)) > or ((0=0 or (((1=0)) and ((1=1 or (((1=1)) and ((1=2))) group by > intType,floatType,stringType,varchar32Type,byteType,shortType,dateType,timestampType,longType; > The jvm of Server was working fine, with continues minor gc. > The cpu kept 100%. > It means the java logic generated by antlr is too complex. > The way to solve the problem may be optimize the syntax file or update the > version of antlr. -- This message was sent by Atlassian JIRA (v6.3.15#6346)