[ https://issues.apache.org/jira/browse/HIVE-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625193#comment-13625193 ]
caofangkun commented on HIVE-4307: ---------------------------------- [~navis] if quotation marks is wrong then should throw Parse Error hive (default)> explain select * from srcpart where 'test' = 'test’; [2013-04-08 14:38:58]: Compile Start FAILED: Parse Error: line 1:51 character '<EOF>' not supported here line 1:50 character '’' not supported here [2013-04-08 14:38:58]: Compile End > For partitioned table , if where statement is 'const string equals const > string', the query will throw MismatchedTokenException > ------------------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-4307 > URL: https://issues.apache.org/jira/browse/HIVE-4307 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.10.0 > Reporter: caofangkun > Priority: Minor > Attachments: HIVE-4307-1.patch > > > For example: > create table srcpart (key string, value string) partitioned by (ds string, hr > string); > hive>explain select * from srcpart where 'test'='test2'; > BR.recoverFromMismatchedToken > FAILED: Error in semantic analysis: MetaException(message:Error parsing > partition filter : MismatchedTokenException(9!=8)) > For views there's a potentially dangerous: > For Example: > create view v_test_table ( id, key, type, dt) as > select id, key ,type dt from > ( select id ,key , 'apple' as type , dt > from src_test_table > where dt='20130326′ > ) t; > The following three query statements will work well: > explain select * from v_test_table where id='123' ; > explain select * from v_test_table where key='123' ; > explain select * from v_test_table where dt='20130326' ; > But the following query will fail : > explain select * from v_test_table where type='orange' ; > BR.recoverFromMismatchedToken > FAILED: Error in semantic analysis: MetaException(message:Error parsing > partition filter : MismatchedTokenException(9!=8)) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira