You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by balajee venkatesh <ba...@gmail.com> on 2017/02/05 12:40:07 UTC
Seems I found a small bug in Apache Hive-2.1.1 ( Partitioning column)
Hi there,
In case data type of partitioning field is different in source table
and target table, then there is no implicit type-casting happens in
target table.
Example :
My source table contains following sample data :
column A column B
2017 20.023
2017 21.056
2016 20.214
2016 21.630
Here, 'column B' is of 'Floating' data type.
My target table is partitioned on 'column B' having 'Integer' data type.
Now, I expect this 'column B' of target table to store the
corresponding source field data without any explicit type casting. I
mean to say that '20.023' should be stored as '20' in 'column B' of
target table and so on but it doesn't happen.
Instead 'NULL' is stored for all source table floating values which is
not an ideal behaviour.
This weird behaviour is limited to partitioned column/columns only. I
can see automatic type conversion and data loading for Non-Partitioned
tables.
Can you please look into this and suggest me where this is a bug or
it's a standard behaviour for partitioned columns where data type of
source and target partitioned field is different?
Thanks & Regards,
Balajee Venkatesh