phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshbabu Chintaguntla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3690) Support declaring default values in Phoenix-Calcite
Date Fri, 24 Feb 2017 01:41:44 GMT

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

Rajeshbabu Chintaguntla commented on PHOENIX-3690:
--------------------------------------------------

[~maryannxue] Actually the expression string is parsenode string.  It can be context related
also. We are converting the parse node to expression and evaluating which should return the
literal of column type. 
{noformat}
                  defaultExpression.evaluate(null, key);
                  column.getDataType().coerceBytes(key, null,
                          defaultExpression.getDataType(),
                          defaultExpression.getMaxLength(), defaultExpression.getScale(),
                          defaultExpression.getSortOrder(),
                          column.getMaxLength(), column.getScale(),
                          column.getSortOrder());
                    Object object =
                            defaultExpression.getDataType().toObject(key,
                                defaultExpression.getSortOrder(), defaultExpression.getMaxLength(),
                                defaultExpression.getScale());
{noformat}

> Support declaring default values in Phoenix-Calcite
> ---------------------------------------------------
>
>                 Key: PHOENIX-3690
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3690
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>              Labels: calcite
>         Attachments: PHOENIX-3690.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message