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 E14AE200CF8 for ; Thu, 14 Sep 2017 18:28:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DF52B1609CC; Thu, 14 Sep 2017 16:28:04 +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 317CD1609CD for ; Thu, 14 Sep 2017 18:28:04 +0200 (CEST) Received: (qmail 74468 invoked by uid 500); 14 Sep 2017 16:28:03 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 74457 invoked by uid 99); 14 Sep 2017 16:28:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2017 16:28:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E417E1845B1 for ; Thu, 14 Sep 2017 16:28:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 8gipfd4VpI9e for ; Thu, 14 Sep 2017 16:28:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 152935FC8A for ; Thu, 14 Sep 2017 16:28:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9D657E06C4 for ; Thu, 14 Sep 2017 16:28:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5D46125383 for ; Thu, 14 Sep 2017 16:28:00 +0000 (UTC) Date: Thu, 14 Sep 2017 16:28:00 +0000 (UTC) From: "Dongjoon Hyun (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SPARK-21997) Spark shows different results on char/varchar columns on Parquet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 14 Sep 2017 16:28:05 -0000 [ https://issues.apache.org/jira/browse/SPARK-21997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dongjoon Hyun updated SPARK-21997: ---------------------------------- Summary: Spark shows different results on char/varchar columns on Parquet (was: Spark shows different results on Hive char/varchar columns on Parquet) > Spark shows different results on char/varchar columns on Parquet > ---------------------------------------------------------------- > > Key: SPARK-21997 > URL: https://issues.apache.org/jira/browse/SPARK-21997 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.2, 2.1.1, 2.2.0 > Reporter: Dongjoon Hyun > > SPARK-19459 resolves CHAR/VARCHAR issues in general, but Spark shows different results according to the SQL configuration, *spark.sql.hive.convertMetastoreParquet*. We had better fix this. Actually, the default of `spark.sql.hive.convertMetastoreParquet` is true, so the result is wrong by default. > For ORC, the default of `spark.sql.hive.convertMetastoreOrc` is false, so SPARK-19459 didn't resolve this together. For ORC, it will happen if we turn on it `true`. > {code} > scala> sql("CREATE TABLE t_char(a CHAR(10), b VARCHAR(10)) STORED AS parquet") > scala> sql("INSERT INTO TABLE t_char SELECT 'a', 'b'") > scala> sql("SELECT * FROM t_char").show > +---+---+ > | a| b| > +---+---+ > | a| b| > +---+---+ > scala> sql("set spark.sql.hive.convertMetastoreParquet=false") > scala> sql("SELECT * FROM t_char").show > +----------+---+ > | a| b| > +----------+---+ > |a | b| > +----------+---+ > scala> spark.version > res3: String = 2.2.0 > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org