lmccay opened a new pull request #300: KNOX-2308 - Add sortNumeric to 
KnoxShellTable for Cols that are numer…
URL: https://github.com/apache/knox/pull/300
 
 
   …ic but values are String
   
   Change-Id: I773e5ee9805347de36d5e4921a026f91b35c54b7
   
   (It is very **important** that you created an Apache Knox JIRA for this 
change and that the PR title/commit message includes the Apache Knox JIRA ID!)
   
   ## What changes were proposed in this pull request?
   
   Tables that are created from CSV files contain cols with only String types 
even though cols can be created with specific types. Sorting numeric values as 
Strings result in improper sorts. This patch provides a sortNumeric which 
internally converts the col to doubles and then does the sort. It sorts the 
table properly but leaves the col unchanged within the table itself.
   
   ## How was this patch tested?
   Unit test added, existing unit tests run.
   Manually tested with dataset with a col of strings that are numeric values.
   
   Please review [Knox Contributing 
Process](https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-GithubWorkflow)
 before opening a pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to