Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E3F3C200C3A for ; Fri, 31 Mar 2017 18:55:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E270E160B80; Fri, 31 Mar 2017 16:55:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 383F9160B7C for ; Fri, 31 Mar 2017 18:55:01 +0200 (CEST) Received: (qmail 43800 invoked by uid 500); 31 Mar 2017 16:55:00 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 43787 invoked by uid 99); 31 Mar 2017 16:55:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2017 16:55:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CFF691A05C0 for ; Fri, 31 Mar 2017 16:54:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Yf8gvwYA5l9E for ; Fri, 31 Mar 2017 16:54:58 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9DA125FC73 for ; Fri, 31 Mar 2017 16:54:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v2VGsvBS004362; Fri, 31 Mar 2017 16:54:57 GMT Message-Id: <201703311654.v2VGsvBS004362@ip-10-146-233-104.ec2.internal> Date: Fri, 31 Mar 2017 16:54:56 +0000 From: "Lars Volker (Code Review)" To: Attila Jeges , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: lv@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3381=3A_Support_AM/PM_marker_in_date_and_time_format_strings=0A?= X-Gerrit-Change-Id: I99794a3e152f1712c6c469bb266d23a81d19ca34 X-Gerrit-ChangeURL: X-Gerrit-Commit: 5a0742434cdacef1a52a269197dfaf1f502db4c9 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Fri, 31 Mar 2017 16:55:02 -0000 Lars Volker has posted comments on this change. Change subject: IMPALA-3381: Support AM/PM marker in date and time format strings ...................................................................... Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/6523/1/be/src/exprs/expr-test.cc File be/src/exprs/expr-test.cc: Line 5641: // AM/PM marker can be repeated and placed anywhere in the format string Do we have a check that prevents having multiple separate am/pm markers? http://gerrit.cloudera.org:8080/#/c/6523/1/be/src/runtime/timestamp-parse-util.cc File be/src/runtime/timestamp-parse-util.cc: Line 173: case 'a': tok_type = AM_PM_MARKER; dt_ctx->has_am_pm_marker = true; break; Have you considered supporting 'am' and 'pm' as tokens, too, like Greg suggested in the JIRA? Line 201: if (tok_len != 2) { You could remove this if statement (and add 0 below). PS1, Line 467: strncmp You can use strncasecmp() and simplify the code. -- To view, visit http://gerrit.cloudera.org:8080/6523 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I99794a3e152f1712c6c469bb266d23a81d19ca34 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Attila Jeges Gerrit-Reviewer: Lars Volker Gerrit-HasComments: Yes