Am getting data exception error while getting timestamp(from hive table) from spark
sqlContext.sql("FROM table SELECT current_timestamp").collect().foreach(println);
DataTypeException: Unsupported dataType: char(1). If you have a struct and a field name of it has any special characters , please use backticks (`) to quote that field name, e.g. `x+y`. Please note that backtick itself is not supported in a field name.
This is a known issue. The char() field is not supported with Spark SQL. You'll have to change the field to varchar if you want to be able to query the table with Spark.
i was trying to query the varchar field of hive table from spark.
sqlContext.sql("FROM table SELECT name")
Still am getting the same error.