You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zhihua Deng (Jira)" <ji...@apache.org> on 2024/09/23 02:49:00 UTC
[jira] [Updated] (HIVE-28355) Fix intermittent failure of TestHplSqlViaBeeLine#testUNIX_TIMESTAMPHplSQLFunction
[ https://issues.apache.org/jira/browse/HIVE-28355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhihua Deng updated HIVE-28355:
-------------------------------
Labels: hive-4.0.1-must pull-request-available (was: pull-request-available)
> Fix intermittent failure of TestHplSqlViaBeeLine#testUNIX_TIMESTAMPHplSQLFunction
> ---------------------------------------------------------------------------------
>
> Key: HIVE-28355
> URL: https://issues.apache.org/jira/browse/HIVE-28355
> Project: Hive
> Issue Type: Bug
> Reporter: Kiran Velumuri
> Assignee: Kiran Velumuri
> Priority: Major
> Labels: hive-4.0.1-must, pull-request-available
> Fix For: 4.1.0
>
> Attachments: image-2024-06-27-12-27-47-772.png
>
>
> The test TestHplSqlViaBeeLine#testUNIX_TIMESTAMPHplSQLFunction compares UNIX_TIMESTAMP() with System.currentTimeMillis() using regex.
> Instead of seconds(divide by 1000), it compares in 10s of seconds(divide by 10000) to account for the difference of few seconds that might come up between the execution of the System.currentTimeMillis()/10000 and UNIX_TIMESTAMP().
> However, it fails in the case when System.currentTimeMillis()(in seconds) differs from UNIX_TIMESTAMP() in 10s digit and/or 100s digit and/or 1000s digit and so on
>
> Examples:
> The current comparison is highlighted in bold.
> 1. Difference in 1s digit - success
> System.currentTimeMillis() in seconds - {*}171946770{*}5
> UNIX_TIMESTAMP() - {*}171946770{*}6
>
> 2. Difference in 10s digit - fail
> System.currentTimeMillis() in seconds - {*}171946770{*}9
> UNIX_TIMESTAMP() - {*}171946771{*}0
>
> 3. Difference in 100s digit - fail
> System.currentTimeMillis() in seconds - {*}171946779{*}9
> UNIX_TIMESTAMP() - {*}171946780{*}0
>
> 4. Difference in 1000s digit - fail
> System.currentTimeMillis() in seconds - {*}171946799{*}9
> UNIX_TIMESTAMP() - {*}171946800{*}0
--
This message was sent by Atlassian Jira
(v8.20.10#820010)