Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-12287

For dataload, use "INSERT OVERWRITE TABLE" syntax rather than "INSERT OVERWRITE"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.3.0
    • Impala 4.3.0
    • Infrastructure
    • 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"

      Attachments

        Activity

          People

            Unassigned Unassigned
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: