You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Alan Gates <al...@gmail.com> on 2017/10/25 18:03:26 UTC

Question on TransactionalValidationListener

Looking at this code in the TransactionalValidationListener, around line
186:

*if *(hive_metastoreConstants.*TABLE_IS_TRANSACTIONAL*.equalsIgnoreCase(key))
{

  transactional = parameters.get(key);

  parameters.remove(key);

}

Why does it remove the parameter after checking?  In local metastore cases
where the thrift object could actually be shared between client and server,
I think this could lead to a problem if someone does a create table
followed by an alter table using the same thrift object.

Alan.

Re: Question on TransactionalValidationListener

Posted by Wei Zheng <we...@apache.org>.
Yes, and also to remove the invalid table property key/value pair to avoid
potential confusion down the line.

Wei

On Wed, Oct 25, 2017 at 11:29 AM, Eugene Koifman <ek...@hortonworks.com>
wrote:

> I think it’s to normalize case – it’s putting the canonical value back in.
>
> On 10/25/17, 11:03 AM, "Alan Gates" <al...@gmail.com> wrote:
>
>     Looking at this code in the TransactionalValidationListener, around
> line
>     186:
>
>     *if *(hive_metastoreConstants.*TABLE_IS_TRANSACTIONAL*.
> equalsIgnoreCase(key))
>     {
>
>       transactional = parameters.get(key);
>
>       parameters.remove(key);
>
>     }
>
>     Why does it remove the parameter after checking?  In local metastore
> cases
>     where the thrift object could actually be shared between client and
> server,
>     I think this could lead to a problem if someone does a create table
>     followed by an alter table using the same thrift object.
>
>     Alan.
>
>
>

Re: Question on TransactionalValidationListener

Posted by Eugene Koifman <ek...@hortonworks.com>.
I think it’s to normalize case – it’s putting the canonical value back in.

On 10/25/17, 11:03 AM, "Alan Gates" <al...@gmail.com> wrote:

    Looking at this code in the TransactionalValidationListener, around line
    186:
    
    *if *(hive_metastoreConstants.*TABLE_IS_TRANSACTIONAL*.equalsIgnoreCase(key))
    {
    
      transactional = parameters.get(key);
    
      parameters.remove(key);
    
    }
    
    Why does it remove the parameter after checking?  In local metastore cases
    where the thrift object could actually be shared between client and server,
    I think this could lead to a problem if someone does a create table
    followed by an alter table using the same thrift object.
    
    Alan.