Github user sureshsubbiah commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/496#discussion_r66107837
--- Diff: core/sql/executor/ExExeUtilGet.cpp ---
@@ -5171,14 +5227,23 @@ short ExExeUtilHiveMDaccessTcb::work()
str_pad(infoCol->dtQualifier, 28, ' ');
if (infoCol->fsDatatype == REC_DATETIME)
- {
- // hive currently only supports timestamp
+ {
+ if(infoCol->colSize > 10) {
infoCol->dtCode = SQLDTCODE_TIMESTAMP;
infoCol->colScale = 6;
str_cpy(infoCol->dtQualifier, "(6)", 28, ' ');
infoCol->dtStartField = 1;
infoCol->dtEndField = 6;
- }
+ }
+ else
+ {
+ infoCol->dtCode = SQLDTCODE_DATE;
+ infoCol->colScale = 0;
+ str_pad(infoCol->dtQualifier, 28, ' ');
+ infoCol->dtStartField = 1;
+ infoCol->dtEndField = 6;
--- End diff --
The dtEndField should be 3 I think. Please see common/DatetimeType.h.
SqlDate goes from REC_DATE_YEAR to REC_DATE_DAY. I don't if this minor error
will lead to a noticeable issue. If it could be addressed in a later PR that
will be good.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---