You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2020/06/01 22:00:00 UTC

[jira] [Resolved] (HIVE-22459) Hive datadiff function provided inconsistent results when hive.ferch.task.conversion is set to none

     [ https://issues.apache.org/jira/browse/HIVE-22459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesus Camacho Rodriguez resolved HIVE-22459.
--------------------------------------------
    Resolution: Duplicate

> 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
>            Priority: Critical
>
> 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:java}
> 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:java}
> 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}
> Steps to reproduce
> {code}
> create external table testdatediff(datetimecol string) stored as orc;
> insert into testdatediff values ('2019-09-09T10:45:49+02:00'),('2019-07-24');
> select datetimecol from testdatediff where datediff(cast(current_timestamp as string), datetimecol)<183;
> set hive.ferch.task.conversion=none;
> select datetimecol from testdatediff where datediff(cast(current_timestamp as string), datetimecol)<183;
> {code}



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