[
https://issues.apache.org/jira/browse/HIVE-21316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776865#comment-16776865
]
Zoltan Haindrich edited comment on HIVE-21316 at 2/25/19 3:16 PM:
------------------------------------------------------------------
sqll2011 ; 6.13.12.a.ii cast specification:
{code}
If the length in octets of SV is larger than LTD, then TV is the first LTD
octets of SV and a
completion condition is raised: warning — string data, right truncation.
{code}
the existing behaviour is truncate without warning and "return null" if the
string was not within the design specifications ; for example in case
length>255 for char
was (Author: kgyrtkirk):
sqll2011 ; 6.13.12.a.ii cast specification:
{code}
If the length in octets of SV is larger than LTD, then TV is the first LTD
octets of SV and a
completion condition is raised: warning — string data, right truncation.
{code}
the existing behaviour to "return null" if the string was not fit into the
{{char\(n\)}} type was incorrect.
> Comparision of varchar column and string literal should happen in varchar
> -------------------------------------------------------------------------
>
> Key: HIVE-21316
> URL: https://issues.apache.org/jira/browse/HIVE-21316
> Project: Hive
> Issue Type: Improvement
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
>
> this is most probably the root cause behind HIVE-21310 as well
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)