Return-Path: X-Original-To: apmail-drill-commits-archive@www.apache.org Delivered-To: apmail-drill-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F08318230 for ; Tue, 9 Feb 2016 00:26:52 +0000 (UTC) Received: (qmail 21611 invoked by uid 500); 9 Feb 2016 00:26:52 -0000 Delivered-To: apmail-drill-commits-archive@drill.apache.org Received: (qmail 21537 invoked by uid 500); 9 Feb 2016 00:26:52 -0000 Mailing-List: contact commits-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@drill.apache.org Delivered-To: mailing list commits@drill.apache.org Received: (qmail 21492 invoked by uid 99); 9 Feb 2016 00:26:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2016 00:26:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3922EE38D1; Tue, 9 Feb 2016 00:26:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: json@apache.org To: commits@drill.apache.org Date: Tue, 09 Feb 2016 00:26:54 -0000 Message-Id: <985e515e0b384669ae586e0ee21d0567@git.apache.org> In-Reply-To: <0e099b992bb64183a0ab11c9e8b5bcde@git.apache.org> References: <0e099b992bb64183a0ab11c9e8b5bcde@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/8] drill git commit: DRILL-4225 TestDateFunctions#testToChar fails when the locale is non-English - Changed to use LocalDate, LocalTime and LocalDateTime to build expectedResults instead of string literals DRILL-4225 TestDateFunctions#testToChar fails when the locale is non-English - Changed to use LocalDate, LocalTime and LocalDateTime to build expectedResults instead of string literals Closes #311 Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/4e9b8256 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/4e9b8256 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/4e9b8256 Branch: refs/heads/master Commit: 4e9b82562cf0fc46e759b89857ffb85e129a178b Parents: 5e57b0e Author: Akihiko Kusanagi Authored: Sun Dec 27 02:02:03 2015 +0900 Committer: Jason Altekruse Committed: Mon Feb 8 14:54:44 2016 -0800 ---------------------------------------------------------------------- .../org/apache/drill/exec/fn/impl/TestDateFunctions.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/4e9b8256/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestDateFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestDateFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestDateFunctions.java index 088ca06..4718b39 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestDateFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestDateFunctions.java @@ -31,6 +31,9 @@ import org.apache.drill.exec.rpc.user.QueryDataBatch; import org.apache.drill.exec.server.Drillbit; import org.apache.drill.exec.server.RemoteServiceSet; import org.apache.drill.exec.vector.ValueVector; +import org.joda.time.LocalDate; +import org.joda.time.LocalTime; +import org.joda.time.LocalDateTime; import org.junit.Ignore; import org.junit.Test; @@ -133,9 +136,9 @@ public class TestDateFunctions extends PopUnitTestBase { @Test public void testToChar() throws Exception { - String expectedResults[] = {"2008-Feb-23", - "12 20 30", - "2008 Feb 23 12:00:00"}; + String expectedResults[] = {(new LocalDate(2008, 2, 23)).toString("yyyy-MMM-dd"), + (new LocalTime(12, 20, 30)).toString("HH mm ss"), + (new LocalDateTime(2008, 2, 23, 12, 0, 0)).toString("yyyy MMM dd HH:mm:ss")}; testCommon(expectedResults, "/functions/date/to_char.json", "/test_simple_date.json"); }