FAQ
Regarding: http://wiki.apache.org/pig/UserDefinedOrdering



I read the spec and came away wondering how USING clause comparator
class should interact with ASC[ENDING] and DESC[ENDING] ordering that
might be introduced into ORDER ... BY ... in the future.



For instance, if we had:



C = order B by key1 ascending, key2 descending, key3;



It's clear what should happen (key3 default ordering is ascending).



But what happens if the user adds a USING clause:



C = order B by key1 ascending, key2 descending, key3 using
com.mycompany.myproject.SpecialOrderClass;



Are the ordering constraints from the BY clause passed to the user
defined comparator SpecialOrderClass execution function?



Is an error raised that says asc/desc ordering and using are mutually
exclusive?



Thanks

Search Discussions

  • Alan Gates at Nov 14, 2007 at 7:14 pm
    Ciemo,

    I've updated the user defined ordering doc to deal with this. Please
    take a look.

    Alan.

    David (Ciemo) Ciemiewicz wrote:
    Regarding: http://wiki.apache.org/pig/UserDefinedOrdering



    I read the spec and came away wondering how USING clause comparator
    class should interact with ASC[ENDING] and DESC[ENDING] ordering that
    might be introduced into ORDER ... BY ... in the future.



    For instance, if we had:



    C = order B by key1 ascending, key2 descending, key3;



    It's clear what should happen (key3 default ordering is ascending).



    But what happens if the user adds a USING clause:



    C = order B by key1 ascending, key2 descending, key3 using
    com.mycompany.myproject.SpecialOrderClass;



    Are the ordering constraints from the BY clause passed to the user
    defined comparator SpecialOrderClass execution function?



    Is an error raised that says asc/desc ordering and using are mutually
    exclusive?



    Thanks





Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedNov 13, '07 at 11:04p
activeNov 14, '07 at 7:14p
posts2
users2
websitepig.apache.org

People

Translate

site design / logo © 2021 Grokbase