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

import data to local files shoud keep the same sort order as the SELECT statement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.9.0
    • None
    • Query Processor
    • None

    Description

      Step one:
      hive (default)> select * from src;
      35
      48
      100 100
      Step two: outpt data is sorted by src.key DESC
      hive (default)> SELECT src.key, sum(substr(src.value,5)) FROM src GROUP BY src.key limit 5;
      0.0
      100 0.0
      48 0.0

      Step three :
      hive (default)> insert overwrite local directory '/tmp/a' SELECT src.key, sum(substr(src.value,5)) FROM src GROUP BY src.key limit 5 ;

      the data in the output file is sored by src.key ASC ,but why?
      hive (default)> !cat /tmp/a/000000_0;
      48 0.0
      100 0.0
       0.0

      Attachments

        Activity

          People

            Unassigned Unassigned
            caofangkun caofangkun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: