Or bytetype depending on the use case
> On 23. Nov 2017, at 10:18, Herman van Hövell tot Westerflier
> wrote:
>
> You need to use a StringType. The CharType and VarCharType are there to
> ensure compatibility with Hive and ORC; they should not be used anywhere else.
>
>> On Thu, Nov 23, 2017
You need to use a StringType. The CharType and VarCharType are there to
ensure compatibility with Hive and ORC; they should not be used anywhere
else.
On Thu, Nov 23, 2017 at 4:09 AM, 163 wrote:
> Hi,
> when I use Dataframe with table schema, It goes wrong:
>
> val test_schema = StructType(
Hi,
when I use Dataframe with table schema, It goes wrong:
val test_schema = StructType(Array(
StructField("id", IntegerType, false),
StructField("flag", CharType(1), false),
StructField("time", DateType, false)));
val df = spark.read.format("com.databricks.spark.csv")
.schema(test_s