You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "dhruv kapatel (JIRA)" <ji...@apache.org> on 2016/02/15 15:56:18 UTC

[jira] [Created] (HIVE-13059) sub query in rlike clause not working

dhruv kapatel created HIVE-13059:
------------------------------------

             Summary: sub query in rlike clause not working
                 Key: HIVE-13059
                 URL: https://issues.apache.org/jira/browse/HIVE-13059
             Project: Hive
          Issue Type: Bug
    Affects Versions: 1.0.1
         Environment: ubuntu OS 
            Reporter: dhruv kapatel


I want to clean robots entries from log file. One of the way to identify crawlers by the user agent field in weblog.I've stored raw logs in one folder and token of the popular crawlers in crawler table. TO clean logs those have user agent matched with token i made this query

CREATE TABLE temp 
AS
SELECT host,time,method,url,protocol,status,size,referer,agent 
FROM raw_logs
WHERE 
agent NOT RLIKE (SELECT concat_ws("|",collect_set(concat("(.*",token,".*)"))) FROM crawler) ; 

It gives me parseException cannot recognize input near 'SELECT' 'concat_ws' '(' in expression specification.

If i replace result of sub query manually then it works perfect.

CREATE TABLE temp 
AS
SELECT host,time,method,url,protocol,status,size,referer,agent 
FROM raw_logs
WHERE agent NOT RLIKE '(.*Googlebot.*)|(.*bingbot.*)'  ;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)