Rajkumar Singh created HIVE-24724:
-------------------------------------
Summary: Create table with LIKE operator does not work correctly
Key: HIVE-24724
URL: https://issues.apache.org/jira/browse/HIVE-24724
Project: Hive
Issue Type: Bug
Components: Hive, HiveServer2
Affects Versions: 4.0.0
Reporter: Rajkumar Singh
Steps to repro:
{code:java}
create table atable (id int, str1 string);
alter table atable add constraint pk_atable primary key (id) disable novalidate;
create table btable like atable;
{code}
describe formatted btable lacks the constraints information.
CreateTableLikeDesc does not set/fetch the constraints for LIKE table
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L13594-L13616
neither DDLTask fetches/set the constraints for the table.
https://github.com/apache/hive/blob/5ba3dfcb6470ff42c58a3f95f0d5e72050274a42/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/create/like/CreateTableLikeOperation.java#L58-L83
--
This message was sent by Atlassian Jira
(v8.3.4#803005)