Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.3.0
-
None
-
ghx-label-14
Description
In dataload, we have some Hive statements that use the "INSERT OVERWRITE" syntax rather than the "INSERT OVERWRITE TABLE" syntax:
INSERT OVERWRITE {db_name}{db_suffix}.{table_name} VALUES (1, map(true, "true", if(false, false, NULL), "null"), map(-1Y, "one", if(false, 1Y, NULL), "null"), map(-1S, "one", if(false, 1S, NULL), "null"), map(-1L, "one", if(false, 1L, NULL), "null"), map(cast(-1.75 as FLOAT), "a", if(false, cast(1.5 as FLOAT), NULL), "null"), map(cast(-1.75 as DOUBLE), "a", if(false, cast(1.5 as DOUBLE), NULL), "null"), map(-1.8, "a",if(false, 1.5, NULL), "null"), map("one", 1, if(false, "", NULL), NULL), map(cast("Mon" as CHAR(3)), 1, if(false, cast("NUL" as CHAR(3)), NULL), NULL), map(cast("a" as VARCHAR(3)), "A", if(false, cast("" as VARCHAR(3)), NULL), NULL), map(to_utc_timestamp("2022-12-10 08:15:12", "UTC"), "Saturday morning", if(false, to_utc_timestamp("2022-12-10 08:15:12", "UTC"), NULL), "null"), map(to_date("2022-12-10"), "Saturday", if(false, to_date("2022-12-10"), NULL), "null"), named_struct("m", map(1, "one", if(false, 1, NULL), "null"), "s", "some_string") );
Older Hive versions do not support the "INSERT OVERWRITE" syntax, so it would be better to convert all of these to "INSERT OVERWRITE TABLE"