carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anubhav tarar (JIRA)" <>
Subject [jira] [Created] (CARBONDATA-1023) Able to do load from dataframe with byte data type in carbon table
Date Fri, 05 May 2017 05:39:04 GMT
anubhav tarar created CARBONDATA-1023:

             Summary: Able to do load from dataframe with byte data type in carbon table
                 Key: CARBONDATA-1023
             Project: CarbonData
          Issue Type: Bug
          Components: sql
    Affects Versions: 1.0.0-incubating
         Environment: spark common
            Reporter: anubhav tarar
            Assignee: anubhav tarar
            Priority: Trivial

i am able to load data with bytetype from dataframe in a carbon table
as far as documentation says byte type is not supported

 val rdd1 = sqlContext.sparkContext.parallelize(
      Row("byte",1234.toByte) :: Nil)

val schema1 = StructType(
      StructField("string",StringType, nullable = false) ::
      StructField("byte",ByteType, nullable = false) :: Nil)

   val dataFrame = sqlContext.createDataFrame(rdd1, schema1)

      .option("tableName", "carbon1")
      .option("compress", "true")

      sql("select * from carbon1").show()

|  byte| -46|

if we try to create a table with byte type it shows error

      "CREATE TABLE restructure (empno byte, empname String, designation String, doj Timestamp,
" +
      "workgroupcategory int, workgroupcategoryname String, deptno int, deptname String, "
      "projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,"
      "utilization int,salary int) STORED BY 'org.apache.carbondata.format'")


org.apache.carbondata.spark.exception.MalformedCarbonCommandException: Unsupported data type:

This message was sent by Atlassian JIRA

View raw message