[ 
https://issues.apache.org/jira/browse/HIVE-28901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953441#comment-17953441
 ] 

Krisztian Kasa commented on HIVE-28901:
---------------------------------------

[~Aggarwal_Raghav] 
In the script [^wrong.q] strict type check is turned off.
{code:java}
set hive.strict.checks.type.safety=false;
{code}
In this case Hive can't guarantee correct results due to loss of precision when 
converting values.

In the output Hive prints a warning:
{code:java}
WARNING: Comparing bigint and string may result in loss of information.
{code}
Postgres says
{code:java}
SQL Error [42883]: ERROR: operator does not exist: bigint = character
{code}
> I understand for decimals, converting to LONG will result in loss of scale. 
As you mentioned changing the common type to long wouldn't fix the issue.

What does the SQL standard say about this?

 

> Wrong query result for join between string and bigint
> -----------------------------------------------------
>
>                 Key: HIVE-28901
>                 URL: https://issues.apache.org/jira/browse/HIVE-28901
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Raghav Aggarwal
>            Assignee: Raghav Aggarwal
>            Priority: Major
>         Attachments: working.q, working.q.out, wrong.q, wrong.q.out
>
>
> Attaching the wrong and expected output q and q.out file to reproduce the 
> issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to