hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruslan Dautkhanov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-21952) Hive should allow to delete serde properties too, not just add them
Date Thu, 11 Jul 2019 23:53:00 GMT

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

Ruslan Dautkhanov commented on HIVE-21952:
------------------------------------------

If it's helpful to someone - here's example how we delete a serde property `path` currently 
and another table-level property (not a serde property)

{code:sql}
alter session set current_schema=hive_owner;

delete
from serde_params sp2
where param_key in ('path')
  and serde_id in  
(
    select sp.serde_id
    from tbls t 
            join dbs d  on (t.db_id = d.db_id)
            join sds s  on (t.sd_id = s.sd_id)
                join serde_params sp on (s.serde_id = sp.serde_id)
    where
            d.name in ('disc_mrt_c')
         and sp.param_key in ('path')
);

delete  
from table_params tp2
where param_key in ('spark.sql.sources.provider')
  and tbl_id in  
(
    select tp.tbl_id
    from tbls t 
            join dbs d  on (t.db_id = d.db_id)
            join table_params tp  on (t.tbl_id = tp.tbl_id)
    where
            d.name in ('disc_mrt_c')
         and tp.param_key in ('spark.sql.sources.provider')
);

commit;
{code}

our HMS backend is Oracle, but I am sure it'll be very similar for other RDBMS backends.


> Hive should allow to delete serde properties too, not just add them
> -------------------------------------------------------------------
>
>                 Key: HIVE-21952
>                 URL: https://issues.apache.org/jira/browse/HIVE-21952
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 3.0.0, 4.0.0, 2.3.5
>            Reporter: Ruslan Dautkhanov
>            Priority: Critical
>
> Hive should allow to delete serde properties not just add/change them
> We have a use case when a presence of certain serde properties 
> causes issues and we want to delete just that one serde property. 
> It's not currently possible.
> Thanks.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message