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-915) In WHERE clause, Hive failed to resolve alias for subquery with join(s)
Date Tue, 10 Nov 2009 23:27:27 GMT

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

Zheng Shao commented on HIVE-915:

Nhan, branch 0.4 is using an old partition pruner which produced a lot of problems.

Hive trunk moved to a new partition pruner so we would prefer our users to migrate to trunk
from branch 0.4 if they see such problems. I hope we can cut a 0.5 branch towards the end
of Nov.

I've opened HIVE-923 for Hive trunk's compatibility with Hadoop 0.20.1 release.
As described in HIVE-923, Hadoop branch 0.20, or any 0.20 releases after 19/Oct/09 should
not have any problems with Hive trunk.

I will fix HIVE-923 right now.

> In WHERE clause, Hive failed to resolve alias for subquery with join(s)
> -----------------------------------------------------------------------
>                 Key: HIVE-915
>                 URL: https://issues.apache.org/jira/browse/HIVE-915
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.4.0
>         Environment: Hadoop v0.20.1
> Latest code from Hive branch-0.4
> Linux OS (both 32bit & 64bit)
>            Reporter: Nhan Nguyen
>            Priority: Critical
> When executing the below query
> FROM (SELECT ip, country, count(1) AS total FROM eventlog WHERE prt_date=20091022 GROUP
BY ip, country) t1 JOIN bot_ip t2 ON t1.ip=t2.ip
> SELECT t1.ip, t1.country
> WHERE t1.total>0;
> I got "FAILED: Unknown exception : null" 
> WHERE clause will not know about the alias t1.
> And below is the stack trace
> 2009-11-06 11:03:12,776 ERROR ql.Driver (SessionState.java:printError(279)) - FAILED:
Unknown exception : null
> java.lang.NullPointerException
>         at org.apache.hadoop.hive.ql.parse.QBMetaData.getTableForAlias(QBMetaData.java:76)
>         at org.apache.hadoop.hive.ql.parse.ASTPartitionPruner.getTableColumnDesc(ASTPartitionPruner.java:298)
>         at org.apache.hadoop.hive.ql.parse.ASTPartitionPruner.genExprNodeDesc(ASTPartitionPruner.java:220)
>         at org.apache.hadoop.hive.ql.parse.ASTPartitionPruner.genExprNodeDesc(ASTPartitionPruner.java:234)
>         at org.apache.hadoop.hive.ql.parse.ASTPartitionPruner.genExprNodeDesc(ASTPartitionPruner.java:234)
>         at org.apache.hadoop.hive.ql.parse.ASTPartitionPruner.genExprNodeDesc(ASTPartitionPruner.java:234)
>         at org.apache.hadoop.hive.ql.parse.ASTPartitionPruner.addExpression(ASTPartitionPruner.java:397)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPartitionPruners(SemanticAnalyzer.java:624)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:4440)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:76)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:249)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:281)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> It runs fine when omitting WHERE clause or WHERE clause doesn't reference to any column
of t1. It also runs fine if I make no join.
> This is critical as sub-query is the current work-around for the unsupported HAVING clause.
> Hope this gets fixed soon.
> Thanks

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

View raw message