From reviews-return-1053108-archive-asf-public=cust-asf.ponee.io@spark.apache.org Wed Mar 4 10:27:27 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id CD8AC18063F for ; Wed, 4 Mar 2020 11:27:26 +0100 (CET) Received: (qmail 99112 invoked by uid 500); 4 Mar 2020 10:27:26 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 99098 invoked by uid 99); 4 Mar 2020 10:27:26 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2020 10:27:26 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps Message-ID: <158331764618.17320.5988445070501650298.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Wed, 04 Mar 2020 10:27:26 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps URL: https://github.com/apache/spark/pull/27753#discussion_r387575858 ########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala ########## @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper { expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId)) checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected) checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected) + checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected) zoneId = getZoneId("GMT-01:00") expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId)) checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected) checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected) + checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected) zoneId = getZoneId("GMT+07:30") expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId)) checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected) + checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected) - zoneId = getZoneId("GMT+07:30") - expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId)) - checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected) - - zoneId = getZoneId("GMT+07:30") expected = Option(date(2015, 3, 18, 12, 3, 17, 123121, zid = zoneId)) checkStringToTimestamp("2015-03-18T12:03:17.123121+7:30", expected) - - zoneId = getZoneId("GMT+07:30") - expected = Option(date(2015, 3, 18, 12, 3, 17, 123120, zid = zoneId)) Review comment: why drop this test? `123120` is different from `123121` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org