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 18E20200C77 for ; Mon, 1 May 2017 15:24:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 17862160BAE; Mon, 1 May 2017 13:24:08 +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 5ED0A160BAB for ; Mon, 1 May 2017 15:24:07 +0200 (CEST) Received: (qmail 466 invoked by uid 500); 1 May 2017 13:24:06 -0000 Mailing-List: contact issues-help@carbondata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.apache.org Delivered-To: mailing list issues@carbondata.apache.org Received: (qmail 457 invoked by uid 99); 1 May 2017 13:24:06 -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; Mon, 01 May 2017 13:24:06 +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 102811809D6 for ; Mon, 1 May 2017 13:24:06 +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 CYhsXlsEnxlw for ; Mon, 1 May 2017 13:24:05 +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 D7F145FDD9 for ; Mon, 1 May 2017 13:24:04 +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 66486E0630 for ; Mon, 1 May 2017 13:24:04 +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 1AD9021DE2 for ; Mon, 1 May 2017 13:24:04 +0000 (UTC) Date: Mon, 1 May 2017 13:24:04 +0000 (UTC) From: "Liang Chen (JIRA)" To: issues@carbondata.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CARBONDATA-950) selecting table data having a column of "date" type throws exception in hive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 01 May 2017 13:24:08 -0000 [ https://issues.apache.org/jira/browse/CARBONDATA-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Liang Chen resolved CARBONDATA-950. ----------------------------------- Resolution: Fixed Fix Version/s: 1.2.0 > selecting table data having a column of "date" type throws exception in hive > ---------------------------------------------------------------------------- > > Key: CARBONDATA-950 > URL: https://issues.apache.org/jira/browse/CARBONDATA-950 > Project: CarbonData > Issue Type: Bug > Components: data-query > Environment: spark 2.1, hive 1.2.1 > Reporter: Neha Bhardwaj > Assignee: anubhav tarar > Priority: Minor > Fix For: 1.2.0 > > Attachments: my_user.csv > > Time Spent: 1h > Remaining Estimate: 0h > > selecting data from a hive table containing a column of date datatype is failing to render output. > Steps to reproduce: > 1) In Spark Shell : > a) Create Table - > import org.apache.spark.sql.SparkSession > import org.apache.spark.sql.CarbonSession._ > val carbon = SparkSession.builder().config(sc.getConf).getOrCreateCarbonSession("hdfs://localhost:54310/opt/data") > scala> carbon.sql(" create table my_user(id int, name string,dob date) stored by 'carbondata' ").show > b) Load Data - > scala> carbon.sql(""" load data inpath 'hdfs://localhost:54310/Files/my_user.csv' into table my_user """ ).show > 2) In Hive : > a) Add Jars - > add jar /home/neha/incubator-carbondata/assembly/target/scala-2.11/carbondata_2.11-1.1.0-incubating-SNAPSHOT-shade-hadoop2.7.2.jar; > add jar /opt/spark-2.1.0-bin-hadoop2.7/jars/spark-catalyst_2.11-2.1.0.jar; > add jar /home/neha/incubator-carbondata/integration/hive/carbondata-hive-1.1.0-incubating-SNAPSHOT.jar; > b) Create Table - > create table my_user(id int, name string,dob date); > c) Alter location - > hive> alter table my_user set LOCATION 'hdfs://localhost:54310/opt/data/default/my_user' ; > d) Set Properties - > set hive.mapred.supports.subdirectories=true; > set mapreduce.input.fileinputformat.input.dir.recursive=true; > d) Alter FileFormat - > alter table my_user set FILEFORMAT > INPUTFORMAT "org.apache.carbondata.hive.MapredCarbonInputFormat" > OUTPUTFORMAT "org.apache.carbondata.hive.MapredCarbonOutputFormat" > SERDE "org.apache.carbondata.hive.CarbonHiveSerDe"; > e) Query: > select * from my_user; > Expected Output: > display all the data of table my_user. > Actual Output: > Failed with exception java.io.IOException:java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long -- This message was sent by Atlassian JIRA (v6.3.15#6346)