Joe McDonnell created IMPALA-12287:
--------------------------------------

             Summary: For dataload, use "INSERT OVERWRITE TABLE" syntax rather 
than "INSERT OVERWRITE"
                 Key: IMPALA-12287
                 URL: https://issues.apache.org/jira/browse/IMPALA-12287
             Project: IMPALA
          Issue Type: Improvement
          Components: Infrastructure
    Affects Versions: Impala 4.3.0
            Reporter: Joe McDonnell


In dataload, we have some Hive statements that use the "INSERT OVERWRITE" 
syntax rather than the "INSERT OVERWRITE TABLE" syntax:
{noformat}
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")
  );{noformat}
Older Hive versions do not support the "INSERT OVERWRITE" syntax, so it would 
be better to convert all of these to "INSERT OVERWRITE TABLE"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to