You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/03/18 13:52:33 UTC

[jira] [Commented] (TRAFODION-1896) CQD TRAF_UPSERT_WITH_INSERT_DEFAULT_SEMANTICS for non-aligned format

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

ASF GitHub Bot commented on TRAFODION-1896:
-------------------------------------------

GitHub user selvaganesang opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/393

    [TRAFODION-1896] CQD TRAF_UPSERT_WITH_INSERT_DEFAULT_SEMANTICS for no…

    …n-aligned format
    
    This CQD is now honored for non-aligned format by replacing the column
    value with default values for omitted columns and put into hbase table.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/selvaganesang/incubator-trafodion trafodion-1896

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/393.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #393
    
----
commit 53dcf926625f645fa4c5a3ee1df6ce7ba7569717
Author: selvaganesang <se...@esgyn.com>
Date:   2016-03-18T12:24:02Z

    [TRAFODION-1896] CQD TRAF_UPSERT_WITH_INSERT_DEFAULT_SEMANTICS for non-aligned format
    
    This CQD is now honored for non-aligned format by replacing the column
    value with default values for omitted columns and put into hbase table.

----


> CQD TRAF_UPSERT_WITH_INSERT_DEFAULT_SEMANTICS for non-aligned format
> --------------------------------------------------------------------
>
>                 Key: TRAFODION-1896
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1896
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 1.3-incubating
>         Environment: Any
>            Reporter: Hans Zeller
>            Assignee: Selvaganesan Govindarajan
>
> See the discussion with subject "Upsert semantics" in the user list on 3/15/2016 and in https://github.com/apache/incubator-trafodion/pull/380, as well as TRAFODION-1887 and TRAFODION-14.
> It would be good if CQD TRAF_UPSERT_WITH_INSERT_DEFAULT_SEMANTICS would ensure the same semantics for all supported table formats.
> Here is part of the email exchange from the user list:
> Selva Govindarajan
> 5:36 PM 
> to user 
> I believe phoenix doesn’t support insert semantics or the non-null default value columns.  Trafodion supports insert, upsert, non-null default value columns as well as current default values like current timestamp and current user.
>  
> Upsert handling in Trafodion is same as phoenix for non-aligned format. For aligned format it can be controlled via CQD.
>  
> {noformat}
>                            Aligned Format                  Aligned format with          Non-Aligned with                   Non-Aligned with}}
>                            With no omitted                  omitted columns             with no omitted                     omitted current default
>                             columns                                                     / omitted non-current columns
>  
> Default behavior           Replaces row                        MERGE                     Replace the given columns               MERGE
> With the CQD               Replaces row                        Replaces row              Replace the given columns               MERGE
>       set to on
> {noformat}
>  
> The CQD to be used is TRAF_UPSERT_WITH_INSERT_DEFAULT_SEMANTICS (Default is off). In short, this CQD is a no-op for non-aligned format.  
>  
> The behavior of the non-aligned format can’t be controlled by the CQD because we don’t store values for the omitted columns in hbase and hence when the user switches the CQD settings for upserts with different sets of omitted columns, we could end up with non-deterministic values for these columns.    
> For eq. upsert with the cqd set to ‘on’ with a set of omitted columns
> Upsert with the cqd set to ‘off’ with a different set of omitted columns
> If we switch to insert all column values all the time for non-aligned format, then we can let user to control what value needs to be put in for the omitted column.
>  
> Selva                                             
>  
> From: Hans Zeller [mailto:hans.zeller@esgyn.com] 
> Sent: Tuesday, March 15, 2016 4:01 PM
> To: user@trafodion.incubator.apache.org
> Subject: Re: Upsert semantics
> Hans Zeller <ha...@esgyn.com>
> 5:57 PM (20 minutes ago)
> to user 
> Again, IMHO that's the wrong way to go, but I hope others will chime in. Dave gave the best reason, it's a bad idea to make the semantics of UPSERT depend on the internal format. Here is what I would suggest, using Selva's table:
> {noformat}
>                              Aligned Format            Aligned format with          Non-Aligned with                   Non-Aligned with
>                              With no omitted            omitted columns             with no omitted                     omitted current default
>                              columns                                                 / omitted non-current columns
>  
> CQD off                      Replaces row                  MERGE                     Replace the given columns               MERGE
> CQD on (default)             Replaces row                  Replaces row              Replace all columns                Replace all columns
> {noformat}



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