Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C06018AF7 for ; Thu, 19 Nov 2015 06:56:12 +0000 (UTC) Received: (qmail 28392 invoked by uid 500); 19 Nov 2015 06:56:11 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 28072 invoked by uid 500); 19 Nov 2015 06:56:11 -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 27952 invoked by uid 99); 19 Nov 2015 06:56:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 06:56:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7889A2C1F78 for ; Thu, 19 Nov 2015 06:56:11 +0000 (UTC) Date: Thu, 19 Nov 2015 06:56:11 +0000 (UTC) From: "pin_zhang (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-11748) Result is null after alter column name of table stored as Parquet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-11748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013030#comment-15013030 ] pin_zhang commented on SPARK-11748: ----------------------------------- Apache hive 0.14 has added Support for Parquet Column Rename https://issues.apache.org/jira/browse/HIVE-6938 That doesn't work in spark hive > Result is null after alter column name of table stored as Parquet > ------------------------------------------------------------------ > > Key: SPARK-11748 > URL: https://issues.apache.org/jira/browse/SPARK-11748 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.5.1 > Reporter: pin_zhang > > 1. Test with the following code > hctx.sql(" create table " + table + " (id int, str string) STORED AS PARQUET ") > val df = hctx.jsonFile("g:/vip.json") > df.write.format("parquet").mode(SaveMode.Append).saveAsTable(table) > hctx.sql(" select * from " + table).show() > // alter table > val alter = "alter table " + table + " CHANGE id i_d int " > hctx.sql(alter) > > hctx.sql(" select * from " + table).show() > 2. Result > after change table column name, data in null for the changed column > Result before alter table > +---+---+ > | id|str| > +---+---+ > | 1| s1| > | 2| s2| > +---+---+ > Result after alter table > +----+---+ > | i_d|str| > +----+---+ > |null| s1| > |null| s2| > +----+---+ -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org