[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988307#comment-14988307 ] Thejas M Nair commented on HIVE-12328: -- But there seems like a bigger problem here, than just improper error message. The column code is there in both LHS and RHS. It should have complained about ambigous column in this case. (fyi, i was trying to use the "join .. using " syntax, but used " on " instead ). The join expression looks broken, the "keys" under " Map Join Operator" is empty - {code} 0: jdbc:hive2://localhost:1/default> explain select * from sample_07 a join sample_07 b on (code); +-+--+ | Explain | +-+--+ | Plan not optimized by CBO. | | | | Vertex dependency in root stage | | Map 1 <- Map 2 (BROADCAST_EDGE) | | | | Stage-0 | |Fetch Operator | | limit:-1 | | Stage-1 | | Map 1 | | File Output Operator [FS_84] | | compressed:false | | Statistics:Num rows: 243 Data size: 50660 Basic stats: COMPLETE Column stats: NONE | | table:{"serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe","input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"} | | Select Operator [SEL_83] | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988280#comment-14988280 ] Ashutosh Chauhan commented on HIVE-12328: - Apart from usability aspect (which is to give user a quick feedback and not wait till runtime), this also will waste cluster resources by submitting a job and than failing. [~hsubramaniyan] FilterOp::initializeOp() is too late, since thats called at run time. Check needs to happen in plan generation phase. > Join On clause needs a semantic check to verify expression is boolean > -- > > Key: HIVE-12328 > URL: https://issues.apache.org/jira/browse/HIVE-12328 > Project: Hive > Issue Type: Bug > Components: Query Planning >Affects Versions: 1.0.0, 1.2.1 >Reporter: Thejas M Nair >Assignee: Pengcheng Xiong > > SQL join query fails at query runtime with a poor error message if the > expression in the on clause of join is not a boolean. > Hive should give a proper error message at runtime. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988269#comment-14988269 ] Ashutosh Chauhan commented on HIVE-12328: - I think ask is to do this check in compile phase that join condition is valid. Since, such a check is absent in compile time, user is greeted with exception at runtime (as evident from stacktrace). > Join On clause needs a semantic check to verify expression is boolean > -- > > Key: HIVE-12328 > URL: https://issues.apache.org/jira/browse/HIVE-12328 > Project: Hive > Issue Type: Bug > Components: Query Planning >Affects Versions: 1.0.0, 1.2.1 >Reporter: Thejas M Nair >Assignee: Pengcheng Xiong > > SQL join query fails at query runtime with a poor error message if the > expression in the on clause of join is not a boolean. > Hive should give a proper error message at runtime. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988262#comment-14988262 ] Hari Sankar Sivarama Subramaniyan commented on HIVE-12328: -- A qn here, is it possible to catch this error at an earlier phase, say FilterOperator.initializeOp() itself. > Join On clause needs a semantic check to verify expression is boolean > -- > > Key: HIVE-12328 > URL: https://issues.apache.org/jira/browse/HIVE-12328 > Project: Hive > Issue Type: Bug > Components: Query Planning >Affects Versions: 1.0.0, 1.2.1 >Reporter: Thejas M Nair >Assignee: Pengcheng Xiong > > SQL join query fails at query runtime with a poor error message if the > expression in the on clause of join is not a boolean. > Hive should give a proper error message at runtime. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988224#comment-14988224 ] Pengcheng Xiong commented on HIVE-12328: [~thejas], may i ask what msg are you expecting? cc [~jpullokkaran] > Join On clause needs a semantic check to verify expression is boolean > -- > > Key: HIVE-12328 > URL: https://issues.apache.org/jira/browse/HIVE-12328 > Project: Hive > Issue Type: Bug > Components: Parser >Affects Versions: 1.0.0, 1.2.1 >Reporter: Thejas M Nair >Assignee: Pengcheng Xiong > > SQL join query fails at query runtime with a poor error message if the > expression in the on clause of join is not a boolean. > Hive should give a proper error message at runtime. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988215#comment-14988215 ] Thejas M Nair commented on HIVE-12328: -- cc [~ashutoshc] > Join On clause needs a semantic check to verify expression is boolean > -- > > Key: HIVE-12328 > URL: https://issues.apache.org/jira/browse/HIVE-12328 > Project: Hive > Issue Type: Bug > Components: Parser >Affects Versions: 1.0.0, 1.2.1 >Reporter: Thejas M Nair >Assignee: Pengcheng Xiong > > SQL join query fails at query runtime with a poor error message if the > expression in the on clause of join is not a boolean. > Hive should give a proper error message at runtime. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-12328) Join On clause needs a semantic check to verify expression is boolean
[ https://issues.apache.org/jira/browse/HIVE-12328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988213#comment-14988213 ] Thejas M Nair commented on HIVE-12328: -- select * from sample_07 a join sample_07 b on (code); gives - {code} Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at org.apache.hadoop.hive.ql.exec.FilterOperator.process(FilterOperator.java:119) at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:837) at org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:97) at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.forward(MapOperator.java:162) at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:508) {code} > Join On clause needs a semantic check to verify expression is boolean > -- > > Key: HIVE-12328 > URL: https://issues.apache.org/jira/browse/HIVE-12328 > Project: Hive > Issue Type: Bug > Components: Parser >Affects Versions: 1.0.0, 1.2.1 >Reporter: Thejas M Nair >Assignee: Pengcheng Xiong > > SQL join query fails at query runtime with a poor error message if the > expression in the on clause of join is not a boolean. > Hive should give a proper error message at runtime. -- This message was sent by Atlassian JIRA (v6.3.4#6332)