Hi Giri,
Have you tried the COALESCE function:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-ConditionalFunctions
example for a date column type:
hive> select COALESCE(dt, cast('2014-02-23' as date)) from simpletest;
In any case, maybe good to post the question in the Hive user/dev group as
well.
-Rajesh
On Fri, May 15, 2015 at 11:31 AM, Giri P <[email protected]> wrote:
> Hi All,
>
> Since hive is schema on read when we try to write data that is different
> data type into a column it doesn't throw any error. When we try to read it
> , it actually show NULL if its a different data type.
>
> Are there any options to throw error if data is of different data type
> when we try to insert or read
>
>
> Thanks
> Giri
>