Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3227

Implement data loading from user provided string directly for test

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Trivial
    • Resolution: Unresolved
    • 0.10.0
    • None
    • None

    Description

      load data instream 'key value\nkey2 value2' into table test;
      

      This will make test easier and also can reduce test time. For example,

      -- ppr_pushdown.q
      create table ppr_test (key string) partitioned by (ds string);
      alter table ppr_test add partition (ds = '1234');
      insert overwrite table ppr_test partition(ds = '1234') select * from (select '1234' from src limit 1 union all select 'abcd' from src limit 1) s;
      

      last query is 4MR job. But can be replaced by

      create table ppr_test (key string) partitioned by (ds string) ROW FORMAT delimited fields terminated by ' ';
      alter table ppr_test add partition (ds = '1234');
      load data local instream '1234\nabcd' overwrite into table ppr_test partition(ds = '1234');
      

      Attachments

        1. HIVE-3227.1.patch.txt
          7 kB
          Navis Ryu

        Issue Links

          Activity

            People

              navis Navis Ryu
              navis Navis Ryu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: