Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(613)

Issue 262890043: Fix issue with DQL DATETOSTRING function. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by Srinivas
Modified:
9 years, 10 months ago
Reviewers:
JohnL, myk, brett.michael.johnson
CC:
pjo, brett.michael.johnson_gmail.com
Visibility:
Public.

Description

Fix issue with DQL DATETOSTRING function. DATETOSTRING uses UTC rather than server time in Documentum 7.x. This leads to the same problem that using DATETOSTRING was intended to fix: we might get back a timestamp in a non-server timezone, and then hand it back to DQL using the DATE function where it is interpreted as server time. There is a new DATETOSTRING_LOCAL function in Documentum 7.0 that restores the 6.x behavior of DATETOSTRING. This function doesn't exist before 7.0, so we need to check the server version and use the appropriate function. Code changed to detect server version and use DATETOSTRING_LOCAL for version 7 and above, and DATETOSTRONG for others.

Patch Set 1 #

Total comments: 21

Patch Set 2 : Changes as per review. #

Total comments: 8

Patch Set 3 : Changes as per review #

Patch Set 4 : Added extra test to test that regex won't pass for version "7.5.0" #

Total comments: 11

Patch Set 5 : Final LGTM changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -4 lines) Patch
M src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java View 1 2 3 4 4 chunks +9 lines, -2 lines 0 comments Download
M test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java View 1 2 3 4 5 chunks +43 lines, -2 lines 0 comments Download

Messages

Total messages: 11
Srinivas
Please review the changes.
9 years, 10 months ago (2015-08-19 04:36:42 UTC) #1
JohnL
Brett found the description unclear. You might look at b/23226447 to see if that text ...
9 years, 10 months ago (2015-08-20 00:57:36 UTC) #2
Brett
https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java File test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java (right): https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java#newcode771 test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java:771: .replace("DATETOSTRING", "FORMATDATETIME") On 2015/08/20 00:57:36, JohnL wrote: > Less ...
9 years, 10 months ago (2015-08-20 05:18:44 UTC) #3
JohnL
https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java File test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java (right): https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java#newcode771 test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java:771: .replace("DATETOSTRING", "FORMATDATETIME") On 2015/08/20 05:18:44, Brett wrote: > On ...
9 years, 10 months ago (2015-08-20 21:21:34 UTC) #4
Srinivas
Please review the changes. https://codereview.appspot.com/262890043/diff/1/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java File src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java (right): https://codereview.appspot.com/262890043/diff/1/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java#newcode103 src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:103: static String DATETOSTRING_FUNCTION; On 2015/08/20 ...
9 years, 10 months ago (2015-08-21 02:08:00 UTC) #5
JohnL
https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java File test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java (right): https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java#newcode771 test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java:771: .replace("DATETOSTRING", "FORMATDATETIME") On 2015/08/21 02:07:59, Srinivas wrote: > On ...
9 years, 10 months ago (2015-08-21 02:29:07 UTC) #6
Srinivas
Please review the changes. https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java File test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java (right): https://codereview.appspot.com/262890043/diff/1/test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java#newcode771 test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java:771: .replace("DATETOSTRING", "FORMATDATETIME") On 2015/08/21 02:29:07, ...
9 years, 10 months ago (2015-08-21 03:26:09 UTC) #7
JohnL
LGTM, with nits, but please wait for Marc to review. John L https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java File src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java ...
9 years, 10 months ago (2015-08-21 05:09:44 UTC) #8
myk
LGTM, with one additional suggestion. https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java File src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java (right): https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java#newcode350 src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:350: dateToStringFunction = dmSession.getServerVersion().matches("[456]\\..*") Do ...
9 years, 10 months ago (2015-08-21 05:10:22 UTC) #9
Srinivas
Final LGTM changes. https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java File src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java (right): https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java#newcode103 src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:103: @VisibleForTesting String dateToStringFunction; On 2015/08/21 05:09:44, ...
9 years, 10 months ago (2015-08-21 06:03:24 UTC) #10
Srinivas
9 years, 10 months ago (2015-08-21 18:43:00 UTC) #11
On 2015/08/21 06:03:24, Srinivas wrote:
> Final LGTM changes.
> 
>
https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise...
> File src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java
> (right):
> 
>
https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise...
> src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:103:
> @VisibleForTesting  String dateToStringFunction;
> On 2015/08/21 05:09:44, JohnL wrote:
> > Delete extra space before String.
> 
> Done.
> 
>
https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise...
> src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:103:
> @VisibleForTesting  String dateToStringFunction;
> On 2015/08/21 05:09:44, JohnL wrote:
> > Add javadoc, e.g., "The DQL function that returns the time in the server
> > timezone."
> 
> Done.
> 
>
https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise...
> src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:103:
> @VisibleForTesting  String dateToStringFunction;
> On 2015/08/21 05:09:44, JohnL wrote:
> > Move this lower down, below the statics. I'm not sensing much rational for
the
> > groups down there, but maybe a separate group between cabinetWhereCondition
> and
> > the checkpoints?
> 
> Done.
> 
>
https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise...
> src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:350:
> dateToStringFunction = dmSession.getServerVersion().matches("[456]\\..*")
> On 2015/08/21 05:10:22, myk wrote:
> > Do you need to put in a carat (to mark the beginning of the string)? 
> Otherwise,
> > wouldn't this potentially match 7.4.2  ?
> 
> No, it doesn't match "7.4.2". Already added a test to test for this,
> testDateToString_version75() with "7.5.0000.0100  Win32.SQLServer" as version
> string.
> 
>
https://codereview.appspot.com/262890043/diff/80001/src/com/google/enterprise...
> src/com/google/enterprise/adaptor/documentum/DocumentumAdaptor.java:350:
> dateToStringFunction = dmSession.getServerVersion().matches("[456]\\..*")
> On 2015/08/21 05:10:22, myk wrote:
> > Do you need to put in a carat (to mark the beginning of the string)? 
> Otherwise,
> > wouldn't this potentially match 7.4.2  ?
> 
> Done.
> 
>
https://codereview.appspot.com/262890043/diff/80001/test/com/google/enterpris...
> File test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java
> (right):
> 
>
https://codereview.appspot.com/262890043/diff/80001/test/com/google/enterpris...
> test/com/google/enterprise/adaptor/documentum/DocumentumAdaptorTest.java:689:
> throws Exception {
> On 2015/08/21 05:09:44, JohnL wrote:
> > s/Exception/DfException/ throughout the new methods.
> > 
> > The trap door for Exception is to avoid "throws ThisException,
ThatException,
> > AndThatException". it's not meant to suggest using Exception in place of a
> more
> > specific exception.
> 
> Done.

Committed Documentum repository
https://github.com/googlegsa/documentum/commit/e8173a869341d0e12d6c1bf67b0566...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b