[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-11-01 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/7009 )

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

I will certainly get back to this change. Needed to handle some personal issues 
and got off track.


--
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-Change-Number: 7009
Gerrit-PatchSet: 5
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Vincent Tran 
Gerrit-Comment-Date: Wed, 01 Nov 2017 17:18:59 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-10-25 Thread Tim Armstrong (Code Review)
Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/7009 )

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

Do you think you'll have time to get back to this, Vincent? It seems like a 
good change.


--
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-Change-Number: 7009
Gerrit-PatchSet: 5
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Vincent Tran 
Gerrit-Comment-Date: Wed, 25 Oct 2017 23:08:44 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-07-21 Thread Tim Armstrong (Code Review)
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

Yeah it would probably be good to make more copies of that data to increase the 
benchmark run time. If it's completing quickly within a couple of hundred ms 
you may just be measuring startup time.

I'd also usually set num_nodes=1; set num_scanner_threads=1; and look at the 
scan time in the exec summary to make sure that's where time in being spent.

-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-07-20 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/5/be/src/runtime/timestamp-parse-util.cc
File be/src/runtime/timestamp-parse-util.cc:

Line 291:   // If we failed to parse using the default templates we will try 
lazy format.
> how much slower is it doing it this way, compared to using a stamped out fo
Virtually same over 11000 datetime strings. 
http://github.mtv.cloudera.com/gist/anonymous/a605d18c955198ecccda2c42d912d690

But maybe I need a larger dataset?


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-06-19 Thread Dan Hecht (Code Review)
Dan Hecht has posted comments on this change.

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/5/be/src/runtime/timestamp-parse-util.cc
File be/src/runtime/timestamp-parse-util.cc:

Line 291:   // If we failed to parse using the default templates we will try 
lazy format.
how much slower is it doing it this way, compared to using a stamped out 
format?  if slower, you could try to generate the DateTimeFormatContext 
directly rather than the format string which is then parsed again, and then if 
we can make that fast enough, just use this technique for all cases.


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-06-19 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change.

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/5/be/src/runtime/timestamp-parse-util.cc
File be/src/runtime/timestamp-parse-util.cc:

Line 294: std::string buf = "";
This should use a stringstream, otherwise each append may result in a copy of 
the whole string content.


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-06-17 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..


Patch Set 5:

Fixed some nits.

-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-5315: Cast to timestamp fails for YYYY-M-D format

2017-06-17 Thread Vincent Tran (Code Review)
Hello Lars Volker,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/7009

to look at the new patch set (#5).

Change subject: IMPALA-5315: Cast to timestamp fails for -M-D format
..

IMPALA-5315: Cast to timestamp fails for -M-D format

This change allows casting of a string in 'lazy' date
format to timestamp. The supported lazy date formats are:
  -[M]M-[d]d
  -[M]M=[d]d [H]H:[m]m:[s]s[.S]
  -[M]M=[d]dT[H]H:[m]m:[s]s[.S]

Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
---
M be/src/exprs/expr-test.cc
M be/src/runtime/timestamp-parse-util.cc
M be/src/runtime/timestamp-parse-util.h
3 files changed, 95 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/7009/5
-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-17 Thread Vincent Tran (Code Review)
Hello Lars Volker,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/7009

to look at the new patch set (#4).

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..

IMPALA-5315 Cast to timestamp fails for -M-D format

This change allows casting of a string in 'lazy' date
format to timestamp. The supported lazy date formats are:
  -[M]M-[d]d
  -[M]M=[d]d [H]H:[m]m:[s]s[.S]
  -[M]M=[d]dT[H]H:[m]m:[s]s[.S]

Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
---
M be/src/exprs/expr-test.cc
M be/src/runtime/timestamp-parse-util.cc
M be/src/runtime/timestamp-parse-util.h
3 files changed, 95 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/7009/4
-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-17 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/3/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
> Sorry for the delayed response, I missed this question.
Generating it on-the-fly is an excellent idea. Done.
I've also added a few more cases so that it's inline with the current default 
templates.
-[M]M-[d]d[T][H]H:[m]m:[s]s[.S]


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-14 Thread Dan Hecht (Code Review)
Dan Hecht has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/3/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
> So looks like both of these formats should be supported:
Sorry for the delayed response, I missed this question.

That's going to result in a lot of stamped out formats though, right? But I 
guess we don't have a great alternative given the way the code works today. 
Though you'll have to basically parse the input format in order to match it up 
since many of them will have the same lengths, so it seems like there should be 
a better way where we generate the parse information on-the-fly. But if you 
don't see a good way to do that efficiently, I guess stamping them out is okay.


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-08 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/3/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
> Please see the new example that Greg added to the JIRA.
So looks like both of these formats should be supported:

-M[M]-d[d] 
-M[M]-d[d] H[H]:m[m]:s[s]

The simplest solution is to stamp them all out with format templates.

Is this what you have in mind?


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-08 Thread Dan Hecht (Code Review)
Dan Hecht has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/3/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
> what about a single month or day but with a valid time? is that suppose to 
Please see the new example that Greg added to the JIRA.


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-08 Thread Dan Hecht (Code Review)
Dan Hecht has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7009/3/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
what about a single month or day but with a valid time? is that suppose to work 
or not?


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Dan Hecht 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-06 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3: Code-Review+1

Thank you for fixing this!

-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-06 Thread Vincent Tran (Code Review)
Vincent Tran has uploaded a new patch set (#3).

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..

IMPALA-5315 Cast to timestamp fails for -M-D format

This change allows casting of a string in 'lazy' date
format to timestamp. The supported lazy date formats are:
  -M-D
  -MM-D
  -M-DD

Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
---
M be/src/exprs/expr-test.cc
M be/src/runtime/timestamp-parse-util.cc
M be/src/runtime/timestamp-parse-util.h
3 files changed, 43 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/7009/3
-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-06 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7009/2/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2210:   // Test casting of lazy day and/or month format string to timestamp
> nit: this should probably now read day, not date.
Done


http://gerrit.cloudera.org:8080/#/c/7009/2/be/src/runtime/timestamp-parse-util.cc
File be/src/runtime/timestamp-parse-util.cc:

PS2, Line 260: DEFAULT_DATE_FMT_LEN - 2:
> Maybe it would be clearer to replace these with DEFAULT_DATE_FMT_LEN-1 and 
That makes sense. Done.


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-06 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/7009/2/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2210:   // Test casting of lazy date and/or month format string to 
timestamp
nit: this should probably now read day, not date.


http://gerrit.cloudera.org:8080/#/c/7009/2/be/src/runtime/timestamp-parse-util.cc
File be/src/runtime/timestamp-parse-util.cc:

PS2, Line 260: DEFAULT_LAZY_DATE_FMT_LEN
Maybe it would be clearer to replace these with DEFAULT_DATE_FMT_LEN-1 and 
DEFAULT_DATE_FMT_LEN-2. That way it's more obvious what the difference is, i.e. 
they're shorter by one character. What do you think?


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-06 Thread Vincent Tran (Code Review)
Vincent Tran has uploaded a new patch set (#2).

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..

IMPALA-5315 Cast to timestamp fails for -M-D format

This change allows casting of a string in 'lazy' date
format to timestamp. The supported lazy date formats are:
  -M-D
  -MM-D
  -M-DD

Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
---
M be/src/exprs/expr-test.cc
M be/src/runtime/timestamp-parse-util.cc
M be/src/runtime/timestamp-parse-util.h
3 files changed, 45 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/7009/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-06-06 Thread Vincent Tran (Code Review)
Vincent Tran has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/7009/1/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
> Should this also work for lazy years? If not, please add a test to make sur
Done


Line 2217: 
> What about timestamps with a time, like "2012-1-1 09:10:11"? Should we pars
You're right as that will likely require a rewrite of the parser to handle lazy 
date and time more intelligently. Though, I wasn't planning to do that here.

Added negative tests to make sure all of these cases don't parse.


http://gerrit.cloudera.org:8080/#/c/7009/1/be/src/runtime/timestamp-parse-util.h
File be/src/runtime/timestamp-parse-util.h:

Line 217:   static const int DEFAULT_LAZY_SINGLE_DATE_FMT_LEN = 8;
> single and double are often used for floating point precision. Can you thin
Done


Line 233:   static DateTimeFormatContext DEFAULT_LAZY_SINGLE_DATE_CTX;
> same here
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-Reviewer: Vincent Tran 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-05-29 Thread Lars Volker (Code Review)
Lars Volker has posted comments on this change.

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/7009/1/be/src/exprs/expr-test.cc
File be/src/exprs/expr-test.cc:

Line 2216:   TimestampValue::Parse("2001-01-21 00:00:00"));
Should this also work for lazy years? If not, please add a test to make sure it 
doesn't parse.


Line 2217: 
What about timestamps with a time, like "2012-1-1 09:10:11"? Should we parse 
those, too? Should we also allow lazy hours, like "2012-01-01 9:10:11"? In that 
case, writing them all out using explicit format templates may become 
unfeasible.


http://gerrit.cloudera.org:8080/#/c/7009/1/be/src/runtime/timestamp-parse-util.h
File be/src/runtime/timestamp-parse-util.h:

Line 217:   static const int DEFAULT_LAZY_SINGLE_DATE_FMT_LEN = 8;
single and double are often used for floating point precision. Can you think of 
better names here?


Line 233:   static DateTimeFormatContext DEFAULT_LAZY_SINGLE_DATE_CTX;
same here


-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran 
Gerrit-Reviewer: Lars Volker 
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-5315 Cast to timestamp fails for YYYY-M-D format

2017-05-27 Thread Vincent Tran (Code Review)
Vincent Tran has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7009

Change subject: IMPALA-5315 Cast to timestamp fails for -M-D format
..

IMPALA-5315 Cast to timestamp fails for -M-D format

This change allows casting of a string in 'lazy' date
format to timestamp. The supported lazy date formats are:
  -M-D
  -MM-D
  -M-DD

Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
---
M be/src/exprs/expr-test.cc
M be/src/runtime/timestamp-parse-util.cc
M be/src/runtime/timestamp-parse-util.h
3 files changed, 40 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/7009/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9a184a09d7e7783f04d47588537612c2ecec28f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Vincent Tran