pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Pig Wiki] Update of "UserDefinedOrdering" by AlanGates
Date Wed, 14 Nov 2007 19:11:19 GMT
Dear Wiki user,

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

The following page has been changed by AlanGates:

+ == Semantics ==
+ The comparator provided by the user will be applied to the whole ORDER BY key.  This was
chosen for two reasons:
+  1. Providing a separate comparator for every element in the key would make the syntax burdensome.
+  2. It is not planned that this mechanism be used to provide comparators for user defined
types.  Those should be provided as part of the type instead.  This lessens the need for per
key comparators.
  == Logical and Physical Plan Changes ==
  When an ORDER BY clause is encountered in a query a `ProjectSpec` is created
  and passed to the `SortDistinctSpec` that controls how a sort is done.
@@ -84, +89 @@

  returning the default comparator or a user provided one rather than always
  taking the result of this and setting `userComparator`.
+ == Future Considerations ==
+ In the future, it is proposed that ORDER BY will allow ascending and descending order per
key, in a SQL like manner (see ProposedRoadMap).  This will not work well with the fact that
this user provided comparator works on the entire key.  If ascending/descending is added in
the future, the parser should also be modified to make it an error to use these key words
with a user provided comparator.

View raw message