[
https://issues.apache.org/jira/browse/TRAFODION-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483510#comment-16483510
]
zhang.lei edited comment on TRAFODION-3070 at 5/22/18 5:30 AM:
---------------------------------------------------------------
If do "*comment on table hive.hive.test01 is 'test01'*", Trafodion will check
if the external table of test01 exists. if not exists, we have below error:
{color:#ff0000}*ERROR[1389] Object HIVE.HIVE.TEST01 does not exist in
Trafodion. [2018-05-14 15:51:31]*{color}
After we create external table for +hive.hive.test01+, the fullname of external
table is +trafodion."_HV_HIVE_".test01+, then we can do '*comment on ...*'
on +hive.hive.test01+ or +trafodion."_HV_HIVE_".test01.+
When we do '*showddl hive.hive.test01*', In fact, this statement executed
successfully,just not show it, this is why *' comment 'test0102' doesn't
appear in the ddl.'*
We don‘t think should comment on native hive table, so i will fix this issue
for don't allow this operation. you can comment on external table like
'*comment on table trafodion."_HV_HIVE_".test01 is "externaltable"*'.
The issue of '*comment statement are in front of the semicolon*' is a small
problem, I'll solve it at the same time。
was (Author: zhang.lei):
If do "*comment on table hive.hive.test01 is 'test01'*", Trafodion will check
if the external table of test01 exists. if not exists, we have below error:
{color:#FF0000}*ERROR[1389] Object HIVE.HIVE.TEST01 does not exist in
Trafodion. [2018-05-14 15:51:31]*{color}
After we create external table for +hive.hive.test01+, the fullname of external
table is +trafodion."_HV_HIVE_".test0+1, then we can do '*comment on ...*'
on +hive.hive.test01+ or +trafodion."_HV_HIVE_".test01.+
When we do '*showddl hive.hive.test01*', In fact, this statement executed
successfully,just not show it, this is why *' comment 'test0102' doesn't
appear in the ddl.'*
We don‘t think should comment on native hive table, so i will fix this issue
for don't allow this operation. you can comment on external table.
The issue of '*comment statement are in front of the semicolon*' is a small
problem, I'll solve it at the same time。
> Cannot create comment on HIVE table
> -----------------------------------
>
> Key: TRAFODION-3070
> URL: https://issues.apache.org/jira/browse/TRAFODION-3070
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-general
> Affects Versions: any
> Reporter: zhang.lei
> Assignee: zhang.lei
> Priority: Major
> Fix For: any
>
>
> I cannot create comment on HIVE table.
> SQL>comment on table hive.hive.test01 is 'test';
> *
> **
> *** ERROR[1389] Object HIVE.HIVE.TEST01 does not exist in Trafodion.
> [2018-05-14 15:51:31]
> Then I create an external table in trafci for the hive table.
> SQL>create external table test01(a largeint,b varchar(4), c varchar(4)) for
> hive.hive.test01;
> — SQL operation complete.
> And I found I can create comment on the external table.
> SQL>comment on table "__HV_HIVE__".test01 is 'test';
> — SQL operation complete.
> SQL>showddl "__HV_HIVE__".test01;
> CREATE EXTERNAL TABLE TEST01
> (
> A LARGEINT DEFAULT NULL NOT SERIALIZED
> , B VARCHAR(4) CHARACTER SET ISO88591 COLLATE
> DEFAULT DEFAULT NULL NOT SERIALIZED
> , C VARCHAR(4) CHARACTER SET ISO88591 COLLATE
> DEFAULT DEFAULT NULL NOT SERIALIZED
> )
> FOR HIVE.HIVE.TEST01
> ;
> COMMENT ON TABLE TRAFODION."__HV_HIVE__".TEST01 IS 'test' ;
> After that, I try to create comment on the HIVE table.
> The comment statement completes and I check ddls of the HIVE table.
> But the comment 'test0102' doesn't appear in the ddl.
> And comment statement are in front of the semicolon that is the end sign for
> external table ddl.
> SQL>comment on table hive.hive.test01 is 'test0102';
> — SQL operation complete.
> SQL>showddl hive.hive.test01;
> /* Hive DDL */
> CREATE TABLE DEFAULT.TEST01
> (
> A bigint
> , B char(4)
> , C char(4)
> )
> stored as textfile
> ;
> /* Trafodion DDL */
> REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.TEST01;
> /* ObjectUID = 1137319817757950657 */
> CREATE EXTERNAL TABLE TEST01
> (
> A LARGEINT DEFAULT NULL NOT SERIALIZED
> , B VARCHAR(4) CHARACTER SET ISO88591 COLLATE
> DEFAULT DEFAULT NULL NOT SERIALIZED
> , C VARCHAR(4) CHARACTER SET ISO88591 COLLATE
> DEFAULT DEFAULT NULL NOT SERIALIZED
> )
> FOR HIVE.HIVE.TEST01
> COMMENT ON TABLE TRAFODION."__HV_HIVE__".TEST01 IS 'test' ;
> ;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)