Thanks for help!

------------------ ???????? ------------------
??????:&nbsp;"Stamatis Zampetakis"<zabe...@gmail.com&gt;;
????????:&nbsp;2020??6??26??(??????) ????5:28
??????:&nbsp;"dev"<dev@hive.apache.org&gt;;

????:&nbsp;Re: ??Why the NULL will be filterd in HQL??



Hello,

I think it would be easier to understand the problem if you have a query at
hand:

SELECT id FROM author WHERE fname != 'Victor'

0 | Victor
1 | null
2 | Alex

The query should return 2 in every standard compliant SQL database.

Victor != Victor evaluates to FALSE
null != Victor evaluates to UNKNOWN
Alex != Victor evaluates to TRUE

The WHERE clause removes tuples for which the condition evaluates to FALSE
or UNKNOWN and this is the normal behavior.

Best,
Stamatis


On Fri, Jun 26, 2020 at 2:36 AM ???????? <153488...@qq.com&gt; wrote:

&gt; Hi,all:
&gt;
&gt;
&gt; I want to know why the hive needs to filter the NULL when use '<&amp;gt;' 
or
&gt; '!=' in HQL?
&gt; Normally,in Oracle or other Databases the NULL will not be filtered when
&gt; using '<&amp;gt;' or '!='.
&gt; This could be a JIRA?
&gt; Thanks!

Reply via email to