Description
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)
dataFrame.write
.format("carbondata")
.option("tableName", "carbon1")
.option("compress", "true")
.mode(SaveMode.Overwrite)
.save()
sql("select * from carbon1").show()
--------+
string | byte |
--------+
byte | -46 |
--------+
if we try to create a table with byte type it shows error
sql(
"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'")
result
org.apache.carbondata.spark.exception.MalformedCarbonCommandException: Unsupported data type: StructField(empno,ByteType,true).getType