You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2010/06/28 09:14:39 UTC

[Hadoop Wiki] Trivial Update of "Hive/LanguageManual/SortBy" by bryanxu

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/LanguageManual/SortBy" page has been changed by bryanxu.
http://wiki.apache.org/hadoop/Hive/LanguageManual/SortBy?action=diff&rev1=6&rev2=7

--------------------------------------------------

  
  
  === Difference between Sort By and Order By ===
- Hive supports ''SORT BY'' which sorts the data per reducer. The difference between "order by" and "sort by" is that the former guarantees total order in the output while the latter only guarantees ordering of the rows withint a reducer. If there are more than one reducer, "sort by" may give partially ordered final results. 
+ Hive supports ''SORT BY'' which sorts the data per reducer. The difference between "order by" and "sort by" is that the former guarantees total order in the output while the latter only guarantees ordering of the rows within a reducer. If there are more than one reducer, "sort by" may give partially ordered final results. 
  
  Basically, the data in each reducer will be sorted according to the order that the user specified.  The following example shows