Original file is csv:
ORC file are created with Spark 2.3:
scala> val df = spark.read.option("header","true").csv("/user/hadoop/file")
|– COL1: string (nullable = true)|
|– COL2: string (nullable = true)|
hive> CREATE EXTERNAL TABLE test_orc(COL1 STRING, COL2 STRING) STORED AS ORC LOCATION ("s3://bucket/prefix");
hive> SELECT * FROM test_orc;
Everyfield is null. However if fields are generated using lower case in Spark schemas then everything works.
The reason why I'm raising this bug is that we have customers using Hive 2.3.2 to read files we generate through Spark and all our code base is addressing fields using upper case while this is incompatible with their Hive instance.