Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/310#discussion_r52065135
--- Diff: core/sql/common/DateTimeType.cpp ---
@@ -1399,18 +1403,69 @@ NABoolean SQLMPDatetime::isCompatible(const NAType&
other, UInt32 * flags) const
// DatetimeValue : A datetime value
//
// ***********************************************************************
-
DatetimeValue::DatetimeValue
( const char* strValue
, rec_datetime_field startField
, rec_datetime_field endField
, UInt32& fractionPrecision /* IN - OUT */
+, NABoolean useOldConstructor
)
: value_(NULL)
, valueLen_(0)
, startField_(startField)
, endField_ (endField)
{
+ if (useOldConstructor)
+ {
+ oldConstructor(strValue, startField, endField, fractionPrecision);
+ return;
+ }
+
+ char dstValue[101];
+
+ ComDiagsArea *diags = NULL;
+
+ Lng32 trueFP = 6;
+ ULng32 flags = 0;
+ flags |= CONV_NO_HADOOP_DATE_FIX;
+ short rc =
+ ExpDatetime::convAsciiToDatetime((char*)strValue, strlen(strValue),
+ dstValue, 100,
+ startField, endField,
+ ExpDatetime::DATETIME_FORMAT_NONE,
+ trueFP,
+ NULL, &diags, flags);
+ if (rc)
+ return;
--- End diff --
fractionPrecision will be uninitialized if we take this return
---
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.
---