From reviews-return-627121-archive-asf-public=cust-asf.ponee.io@spark.apache.org Wed Mar 21 18:09:04 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1E43818067E for ; Wed, 21 Mar 2018 18:09:03 +0100 (CET) Received: (qmail 14791 invoked by uid 500); 21 Mar 2018 17:09:03 -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 14359 invoked by uid 99); 21 Mar 2018 17:09:02 -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; Wed, 21 Mar 2018 17:09:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 78E63F4E15; Wed, 21 Mar 2018 17:09:02 +0000 (UTC) From: cloud-fan To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request #20579: [SPARK-23372][SQL] Writing empty struct in parque... Content-Type: text/plain Message-Id: <20180321170902.78E63F4E15@git1-us-west.apache.org> Date: Wed, 21 Mar 2018 17:09:02 +0000 (UTC) Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20579#discussion_r176163585 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala --- @@ -719,4 +720,27 @@ object DataSource extends Logging { } globPath } + + /** + * Called before writing into a FileFormat based data source to make sure the + * supplied schema is not empty. + * @param schema + */ + private def hasEmptySchema(schema: StructType): Unit = { + def hasEmptySchemaInternal(schema: StructType): Boolean = { --- End diff -- they should be `verifySchema` and `hasEmptySchema`, depending on their return type. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org