You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Nhan Nguyen (JIRA)" <ji...@apache.org> on 2009/11/06 10:08:32 UTC
[jira] Created: (HIVE-915) In WHERE clause, Hive failed to resolve
alias for subquery with join(s)
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.
[jira] Commented: (HIVE-915) In WHERE clause, Hive failed to
resolve alias for subquery with join(s)
Posted by "Amr Awadallah (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774314#action_12774314 ]
Amr Awadallah commented on HIVE-915:
------------------------------------
you should email the hive-users list for stuff like this instead of creating a JIRA.
SELECT should come before the FROM not after, try this:
{code}
SELECT t1.ip, t1.country
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
WHERE t1.total>0;
{code}
> 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.
[jira] Commented: (HIVE-915) In WHERE clause, Hive failed to
resolve alias for subquery with join(s)
Posted by "Nhan Nguyen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774254#action_12774254 ]
Nhan Nguyen commented on HIVE-915:
----------------------------------
My example is not good enough as we can put all join clauses into sub query and create one alias the the whole joins. This could be a workaround, however, join of multiple sub query may have the described problem.
> 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.
[jira] Commented: (HIVE-915) In WHERE clause, Hive failed to
resolve alias for subquery with join(s)
Posted by "Nhan Nguyen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774328#action_12774328 ]
Nhan Nguyen commented on HIVE-915:
----------------------------------
Dear Awadallah,
I don't mean to be rude, but please be a bit more logical. Hive should complains something about syntax error, if my query had some, rather than throwing a NullPointerException as you can see in my case. There must be a bug in the query parsing process of Hive. And since this stuff is not about query syntax but a bug, I cannot think of any user-mailing list that is better than firing a Jira ticket.
Your suggested query is perfectly correct and is in ANSI form, mine follows Hive-specific syntax thus it's also valid. Except that both will fail because of the same bug. If you have similar environment as I described in the ticket, just try yours and mine and see how Hive behaves.
Anyway, thanks for your quick response.
Nhan
> 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.
[jira] Resolved: (HIVE-915) In WHERE clause, Hive failed to resolve
alias for subquery with join(s)
Posted by "Nhan Nguyen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nhan Nguyen resolved HIVE-915.
------------------------------
Resolution: Fixed
Dear Zheng,
With the new code from trunk, my problem is now solved. Thanks a lot for fixing this.
Nhan.
> 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.
[jira] Commented: (HIVE-915) In WHERE clause, Hive failed to
resolve alias for subquery with join(s)
Posted by "Ning Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774348#action_12774348 ]
Ning Zhang commented on HIVE-915:
---------------------------------
I tried your query (with a little change of using different tables/columns) and it works on trunk. Most probably it is already been fixed in 0.4.1 rc2. Can you try that or trunk?
> 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.
[jira] Commented: (HIVE-915) In WHERE clause, Hive failed to
resolve alias for subquery with join(s)
Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (HIVE-915) In WHERE clause, Hive failed to
resolve alias for subquery with join(s)
Posted by "Nhan Nguyen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774563#action_12774563 ]
Nhan Nguyen commented on HIVE-915:
----------------------------------
Dear Zhang,
The query surely works with trunk code as I wrote it when I used Hadoop v0.19.2 with Hive trunk. However, I need to switch to Hadoop 0.20.1 to maximize processing performance but I then couldn't start Hive trunk anymore. Someone suggested that Hive 0.4 works with the new Hadoop, thus I switched both software.
I've also tried 0.4.1rc2 as you suggested but the bug is still there :(
Btw, If you happen to know how to make Hive code from trunk to work with Hadoop v0.20.1 in multinode cluster, please kindly show me the necessary configuration.
Thanks
> 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.