Chiran Ravani created HIVE-22459:
------------------------------------

             Summary: Hive datadiff function provided inconsistent results when 
hive.ferch.task.conversion is set to none
                 Key: HIVE-22459
                 URL: https://issues.apache.org/jira/browse/HIVE-22459
             Project: Hive
          Issue Type: Improvement
          Components: HiveServer2
    Affects Versions: 3.0.0
            Reporter: Chiran Ravani


Hive datadiff function provided inconsistent results when 
hive.ferch.task.conversion to more

Below is output, whereas in Hive 1.2 the results are consistent

Note: Same query works well on Hive 3 when hive.ferch.task.conversion is set to 
none
Steps to reproduce the problem.
{code}
0: jdbc:hive2://c1113-node2.squadron.support.> select datetimecol from 
testdatediff where datediff(cast(current_timestamp as string), datetimecol)<183;
INFO : Compiling 
command(queryId=hive_20191105103636_1dff22a1-02f3-48a8-b076-0b91272f2268): 
select datetimecol from testdatediff where datediff(cast(current_timestamp as 
string), datetimecol)<183
INFO : Semantic Analysis Completed (retrial = false)
INFO : Returning Hive schema: 
Schema(fieldSchemas:[FieldSchema(name:datetimecol, type:string, comment:null)], 
properties:null)
INFO : Completed compiling 
command(queryId=hive_20191105103636_1dff22a1-02f3-48a8-b076-0b91272f2268); Time 
taken: 0.479 seconds
INFO : Executing 
command(queryId=hive_20191105103636_1dff22a1-02f3-48a8-b076-0b91272f2268): 
select datetimecol from testdatediff where datediff(cast(current_timestamp as 
string), datetimecol)<183
INFO : Completed executing 
command(queryId=hive_20191105103636_1dff22a1-02f3-48a8-b076-0b91272f2268); Time 
taken: 0.013 seconds
INFO : OK
+--------------+
| datetimecol |
+--------------+
| 2019-07-24 |
+--------------+
1 row selected (0.797 seconds)
0: jdbc:hive2://c1113-node2.squadron.support.>
{code}

After setting fetch task conversion as none.

{code}
0: jdbc:hive2://c1113-node2.squadron.support.> set 
hive.fetch.task.conversion=none;
No rows affected (0.017 seconds)
0: jdbc:hive2://c1113-node2.squadron.support.> set hive.fetch.task.conversion;
+----------------------------------+
| set |
+----------------------------------+
| hive.fetch.task.conversion=none |
+----------------------------------+
1 row selected (0.015 seconds)
0: jdbc:hive2://c1113-node2.squadron.support.> select datetimecol from 
testdatediff where datediff(cast(current_timestamp as string), datetimecol)<183;
INFO : Compiling 
command(queryId=hive_20191105103709_0c38e446-09cf-45dd-9553-365146f42452): 
select datetimecol from testdatediff where datediff(cast(current_timestamp as 
string), datetimecol)<183


+----------------------------+
| datetimecol |
+----------------------------+
| 2019-09-09T10:45:49+02:00 |
| 2019-07-24 |
+----------------------------+
2 rows selected (5.327 seconds)
0: jdbc:hive2://c1113-node2.squadron.support.>
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to