hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Utkarsh Srivastava (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-20) Sorting using custom comparison functions
Date Tue, 27 Nov 2007 20:41:43 GMT

    [ https://issues.apache.org/jira/browse/PIG-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545998
] 

Utkarsh Srivastava commented on PIG-20:
---------------------------------------

The instantiateFunc method is called once when the eval spec is deserialized at the hadoop
end. So it would be sufficient to instantiate the comparator in the instantiate func method,
and then simply return that on getComparator.

One problem with the original code that is exposed by this patch is that various subclasses
of EvalSpec provide their own implementations of instantiateFunc, and they never call super.instantiateFunc().
Thus the functionality added by this patch may be missed (currently this does not happen because
sorting is done only on ProjectSpecs that do not override this method). I propose adding super.instantiateFunc()
to all subclasses of EvalSpec that override this method.

> Sorting  using custom comparison functions
> ------------------------------------------
>
>                 Key: PIG-20
>                 URL: https://issues.apache.org/jira/browse/PIG-20
>             Project: Pig
>          Issue Type: New Feature
>          Components: impl
>            Reporter: Olga Natkovich
>         Attachments: usercompare.patch
>
>
> Currently, onlu string based sorting is supported. Once we have types, numeric sort will
be supported as well. However, soem users express need for custome comparison functions for
sort.
> Alan put together a design document for this:
> http://wiki.apache.org/pig/UserDefinedOrdering

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message