[
https://issues.apache.org/jira/browse/TRAFODION-2363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687655#comment-15687655
]
ASF GitHub Bot commented on TRAFODION-2363:
-------------------------------------------
Github user anoopsharma00 commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/846#discussion_r89192496
--- Diff: core/sql/comexe/ComTdbExeUtil.h ---
@@ -2946,37 +2946,65 @@ class ComTdbExeUtilLobShowddl : public ComTdbExeUtil
static const ComTdbVirtTableColumnInfo hiveMDTablesColInfo[] =
{
- { "CATALOG_NAME", 0, COM_USER_COLUMN, REC_BYTE_F_ASCII, 256,
FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
- { "SCHEMA_NAME", 1, COM_USER_COLUMN, REC_BYTE_F_ASCII, 256,
FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
- { "TABLE_NAME", 2, COM_USER_COLUMN, REC_BYTE_F_ASCII, 256,
FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT,
"",NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}
+ { "CATALOG_NAME", 0, COM_USER_COLUMN, REC_BYTE_F_ASCII, 256,
FALSE , SQLCHARSETCODE_UTF8, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
+ { "SCHEMA_NAME", 1, COM_USER_COLUMN, REC_BYTE_F_ASCII, 256,
FALSE , SQLCHARSETCODE_UTF8, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
+ { "TABLE_NAME", 2, COM_USER_COLUMN, REC_BYTE_F_ASCII, 256,
FALSE , SQLCHARSETCODE_UTF8, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
+ { "FILE_FORMAT", 3, COM_USER_COLUMN, REC_BYTE_F_ASCII, 24,
FALSE , SQLCHARSETCODE_ISO88591, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
+ { "CREATE_TIME", 4, COM_USER_COLUMN, REC_BIN64_SIGNED, 8,
FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, ""
,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0},
--- End diff --
it is to be consistent with how traf metadata create time field is set.
That way callers (like DBMgr) can use the same/similar queries when looking
at this field for traf and hive tables.
Another related note: create time in hive is set to number of seconds
from epoch (1 jan 1970). When returning it as part of hivemd, we convert
it to juliantimestamp(in microseconds from 1/1/0001). This is consistent
with the value returned for tables stored in traf metadata.
> Add support to return metadata info about hive tables in relational format
> --------------------------------------------------------------------------
>
> Key: TRAFODION-2363
> URL: https://issues.apache.org/jira/browse/TRAFODION-2363
> Project: Apache Trafodion
> Issue Type: Improvement
> Reporter: Anoop Sharma
> Assignee: Anoop Sharma
> Priority: Minor
>
> Metadata info about trafodion tables and columns can be retrieved by
> running sql queries against traf metadata tables/views from "_MD_" schema.
> This jira is for an enhancement to return metadata info about hive
> tables/columns in relational format using traf queries.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)