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

Sergey Soldatov commented on PHOENIX-2734:
------------------------------------------

We have the following check:
{noformat}
      if (!actualType.isCoercibleTo(type, value) &&
                (!actualType.equals(PVarchar.INSTANCE) ||
                        !(type.equals(PDate.INSTANCE) || 
type.equals(PTimestamp.INSTANCE) || type.equals(PTime.INSTANCE)))) {
            throw TypeMismatchException.newException(type, actualType, 
value.toString());
        }
{noformat}
so, there is a direct check for date/time types. Should it be replaced with the 
.isCoercibleTo?

> Literal expressions for UNSIGNED_DATE/UNSIGNED_TIME/etc
> -------------------------------------------------------
>
>                 Key: PHOENIX-2734
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2734
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Sergey Soldatov
>            Assignee: Sergey Soldatov
>
> At the moment LiteralExpression accepts convertion from varchar to  PDate, 
> PTimestamp and PTime, but not for the PUnsigned... type. Is there any reason 
> for that or we can just add an additional check for Unsigned types as well? 
> The problem is that there is no way to load values to Unsigned date/time 
> types using bulk load ( for regular upsert there is an workaround to use 
> TO_TIME/etc functions). [~pctony] what do you think?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to