Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: edit Column Type Conversion

...

Code Block
languagetext
INSERT OVERWRITE TABLE target_table
  SELECT name, id, category FROM source_table_1
  UNION ALL
  SELECT name, id, "Category159" as category FROM source_table_2

Column Type Conversion Conversion

Before HIVE-14251 in release 2.2.0, Hive tries to perform implict implicit conversion across Hive type groups. With the change of HIVE-14251Hive will only perform implicit conversion within each type groups group including string group, number group or date group, not across groups. In order to union the types from different groups such as a string type and a date type, a an explicit cast from string to date or from date to string is needed in the query.

...