[jira] [Created] (HIVE-17345) Invalid error message for absent function

2017-08-17 Thread Alexey Bedrintsev (JIRA)
Alexey Bedrintsev created HIVE-17345:


 Summary: Invalid error message for absent function
 Key: HIVE-17345
 URL: https://issues.apache.org/jira/browse/HIVE-17345
 Project: Hive
  Issue Type: Bug
  Components: Diagnosability, Hive, Parser, Query Planning, UDF
Affects Versions: 1.2.1
 Environment: hive --version
Hive 1.2.1000.2.6.1.0-129
Subversion 
git://c66-slave-38a0b1a6-3/grid/0/jenkins/workspace/HDP-parallel-centos6/SOURCES/hive
 -r 4c6995c87f30906625e01c28e5e111a53c2e582f
Compiled by jenkins on Wed May 31 03:19:31 UTC 2017
>From source with checksum e3ee749ba0a797bb10a7e12265daa82d
Reporter: Alexey Bedrintsev


For test purposes let have any table, e.g. like this one with two columns:
{code:sql}
create table test (x int, y int);
insert into test values (0, 0), (1, 0), (2, 0), (0, 1), (1, 1), (1, 2);
{code}

If we try to query using not existent aggregate function QQQ, then get 
descriptive error message:
{code:sql}
SELECT QQQ(y)
FROM test;
{code}
{code}
FAILED: SemanticException [Error 10011]: Line 1:7 Invalid function 'QQQ'
{code}

But if I use this function with _group by_ clause, I get confusing message 
about wrong query structure:

{code:sql}
SELECT x,
   QQQ(y)
FROM test
GROUP BY x;
{code}
{code}
FAILED: SemanticException [Error 10025]: Line 1:10 Expression not in GROUP BY 
key 'y'
{code}

For queries with _having_ clauses error message is more confusing. It is 
regarding to zero value which is absolutely correct:
{code}
SELECT x,
   QQQ(y) AS q
FROM test
GROUP BY x HAVING q > 0;
{code}
{code}
FAILED: SemanticException [Error 10025]: Line 4:7 Expression not in GROUP BY 
key '0'
{code}

*Expected result*: the same error message {code} "FAILED: SemanticException 
[Error 10011]: Line 1:7 Invalid function 'QQQ'"{code} for all listed queries.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (HIVE-15517) NOT (x <=> y) returns NULL if x or y is NULL

2016-12-27 Thread Alexey Bedrintsev (JIRA)
Alexey Bedrintsev created HIVE-15517:


 Summary: NOT (x <=> y) returns NULL if x or y is NULL
 Key: HIVE-15517
 URL: https://issues.apache.org/jira/browse/HIVE-15517
 Project: Hive
  Issue Type: Bug
  Components: Hive, Operators, Query Processor, SQL
Reporter: Alexey Bedrintsev






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