You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/22 16:58:00 UTC

[jira] [Work logged] (KNOX-2308) Add sortNumeric to KnoxShellTable for Cols that are numeric but values are String

     [ https://issues.apache.org/jira/browse/KNOX-2308?focusedWorklogId=407633&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-407633 ]

ASF GitHub Bot logged work on KNOX-2308:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Mar/20 16:57
            Start Date: 22/Mar/20 16:57
    Worklog Time Spent: 10m 
      Work Description: lmccay commented on 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:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 407633)
    Remaining Estimate: 0h
            Time Spent: 10m

> Add sortNumeric to KnoxShellTable for Cols that are numeric but values are String
> ---------------------------------------------------------------------------------
>
>                 Key: KNOX-2308
>                 URL: https://issues.apache.org/jira/browse/KNOX-2308
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: KnoxShell
>            Reporter: Larry McCay
>            Assignee: Larry McCay
>            Priority: Major
>             Fix For: 1.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)