When create a hive table, it raises an error if assign a Hive String field some Ion value (e.g. Ion timestamp, Ion integer).
For example,
CREATE EXTERNAL TABLE `test`(`starttime` string)
ROW FORMAT SERDE 'com.amazon.ionhiveserde.IonHiveSerDe'
STORED AS INPUTFORMAT 'com.amazon.ionhiveserde.formats.IonInputFormat'
OUTPUTFORMAT 'com.amazon.ionhiveserde.formats.IonOutputFormat'
and the Ion file is:
{starttime: 2020-11-05T07:18:59.968Z}
it throw an exception:
Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: com.amazon.ion.impl.lite.IonTimestampLite cannot be cast to com.amazon.ion.IonText
When create a hive table, it raises an error if assign a Hive String field some Ion value (e.g. Ion timestamp, Ion integer). For example,
and the Ion file is:
it throw an exception: