From reviews-return-1060985-archive-asf-public=cust-asf.ponee.io@spark.apache.org Sat Mar 14 06:33:37 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 9F46F18063D for ; Sat, 14 Mar 2020 07:33:37 +0100 (CET) Received: (qmail 32013 invoked by uid 500); 14 Mar 2020 06:33:37 -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 32001 invoked by uid 99); 14 Mar 2020 06:33:37 -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; Sat, 14 Mar 2020 06:33:37 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] maropu commented on a change in pull request #27909: [SPARK-31151][SQL][DOC] Reorganize the migration guide of SQL Message-ID: <158416761680.10746.5515604943800469617.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Sat, 14 Mar 2020 06:33:36 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit maropu commented on a change in pull request #27909: [SPARK-31151][SQL][DOC] Reorganize the migration guide of SQL URL: https://github.com/apache/spark/pull/27909#discussion_r392562097 ########## File path: docs/sql-migration-guide.md ########## @@ -201,6 +222,58 @@ license: | + - Since Spark 3.0, when casting interval values to string type, there is no "interval" prefix, e.g. `1 days 2 hours`. In Spark version 2.4 and earlier, the string contains the "interval" prefix like `interval 1 days 2 hours`. + + - Since Spark 3.0, when casting string value to integral types(tinyint, smallint, int and bigint), datetime types(date, timestamp and interval) and boolean type, the leading and trailing whitespaces (<= ASCII 32) will be trimmed before converted to these type values, e.g. `cast(' 1\t' as int)` results `1`, `cast(' 1\t' as boolean)` results `true`, `cast('2019-10-10\t as date)` results the date value `2019-10-10`. In Spark version 2.4 and earlier, while casting string to integrals and booleans, it will not trim the whitespaces from both ends, the foregoing results will be `null`, while to datetimes, only the trailing spaces (= ASCII 32) will be removed. + +### SQL Query Statements + Review comment: Since it seems this section describes parser behaviours, how about `SQL Query Statements` -> `SQL Parsing`? ---------------------------------------------------------------- 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