hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-372) Nested UDFs cause _very_ high memory usage when processing query
Date Fri, 10 Apr 2009 01:26:12 GMT

    [ https://issues.apache.org/jira/browse/HIVE-372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697705#action_12697705

Zheng Shao commented on HIVE-372:

By just modifying "k=1" to "k=3", the compilation was much faster. We were also able to identify
the correct error like the following:

hive> create table test (a int b);
FAILED: Parse Error: line 2:25 mismatched input 'b' expecting ) in create statement

Originally it was:
hive> create table test (a int b);
FAILED: Parse Error: line 2:7 mismatched input 'table' expecting TEMPORARY in create function

I guess the reason is that k=3 makes sure in most cases, we don't need to backtrack. (We still
need backtracking in some cases, since when I switch backtracking I saw some warnings from

I will make a patch to change k=1 to k=3, and add a test case for the above, then I will leave
the backtracking problem a bit later.

> Nested UDFs cause _very_ high memory usage when processing query
> ----------------------------------------------------------------
>                 Key: HIVE-372
>                 URL: https://issues.apache.org/jira/browse/HIVE-372
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>         Environment: Fedora Linux, 10x Amazon EC2 (Large Instance w/ 8GB Ram)
>            Reporter: Steve Corona
> When nesting UDFs, the Hive Query processor takes a large amount of time+memory to process
the query. For example, I ran something along the lines of:
> select trim( trim( trim(trim( trim( trim( trim( trim( trim(column))))))))) from test_table;
> This query needs 10GB+ of memory to process before it'll launch the job. The amount of
memory increases exponentially with each nested UDF.
> Obviously, I am using trim() in this case as a simple example that causes the same problem
to occur. In my actual use-case I had a bunch of nested regexp_replaces.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message