carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anubhav tarar (JIRA)" <>
Subject [jira] [Created] (CARBONDATA-1461) Unable to Read Date Type in HIve
Date Thu, 07 Sep 2017 10:50:00 GMT
anubhav tarar created CARBONDATA-1461:

             Summary: Unable to Read Date Type in HIve
                 Key: CARBONDATA-1461
             Project: CarbonData
          Issue Type: Bug
          Components: hive-integration
    Affects Versions: 1.2.0
         Environment: hive1.21.,spark 2.1
            Reporter: anubhav tarar
            Assignee: anubhav tarar
            Priority: Trivial
             Fix For: 1.2.0

    val connection = DriverManager.getConnection(s"jdbc:hive2://localhost:$port/default",
"", "")
    val statement: Statement = connection.createStatement"============HIVE CLI IS STARTED ON PORT $port ==============")

    statement.execute("CREATE TABLE IF NOT EXISTS carbon_table(shortField SMALLINT,intField
INT,bigintField " +
                      "bigint,doubleField DOUBLE,stringField STRING,timestampField TIMESTAMP,"
                      "decimalField DECIMAL(18,2),dateField DATE,\n charField CHAR(5),floatField
" +
                      "double,complexData ARRAY<STRING>)")
        "ALTER TABLE carbon_table SET FILEFORMAT INPUTFORMAT \"org.apache.carbondata." +
        "hive.MapredCarbonInputFormat\"OUTPUTFORMAT \"org.apache.carbondata.hive." +
        "MapredCarbonOutputFormat\"SERDE \"org.apache.carbondata.hive." +
        "CarbonHiveSerDe\" ")

        "ALTER TABLE carbon_table SET LOCATION 'file:///home/vinod/Desktop/carbondata/examples/spark2/target/store/default/carbon_table'

    val sql = "SELECT dateField FROM carbon_table"

    val resultSet: ResultSet = statement.executeQuery(sql)


exception in thread "main" org.apache.hive.service.cli.HiveSQLException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
	at org.apache.hive.jdbc.Utils.verifySuccess(
	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(

This message was sent by Atlassian JIRA

View raw message