[ 
https://issues.apache.org/jira/browse/SQOOP-1936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14274188#comment-14274188
 ] 

Jarek Jarcec Cecho commented on SQOOP-1936:
-------------------------------------------

I see your point [~vybs], so let me rephrase my answer - Sqoop 2 does not 
define any ordering of the output records - user nor connector developer 
shouldn't depend on any particular order. Obviously we need to have some 
implementation inside, but because the project doesn't prescribe the order, we 
can easily change that at any point. I think that we added this text 
representation comparison in {{SqoopWritable}} only as it was easier at that 
time.  Deferring the compare method to IDF implementation seems completely 
reasonable to me.

> Ordering of the Sqoop output is dependent on the IDF text format, is this 
> expected?
> -----------------------------------------------------------------------------------
>
>                 Key: SQOOP-1936
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1936
>             Project: Sqoop
>          Issue Type: Sub-task
>            Reporter: Veena Basavaraj
>
> The compareTo method in SqoopWritable looks like below, this means we are 
> relying on the entire CSVString to order elements in the output.
> For instance, if we have 20 records  in JDBC data source, the output will not 
> be ordered by its primary key, especially when we need to do delta merges, we 
> have to be cognizant that the ordering of records in the output is controlled 
> by their CSV representation
> {code}
>   String getString() {
>     return toIDF.getCSVTextData();
>   }
>   @Override
>   public int compareTo(SqoopWritable o) {
>     return getString().compareTo(o.getString());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to