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

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

                Author: ASF GitHub Bot
            Created on: 10/Oct/19 22:49
            Start Date: 10/Oct/19 22:49
    Worklog Time Spent: 10m 
      Work Description: lmccay4 commented on pull request #163: KNOX-2052 - 
KnoxShellTable mean, median, and mode methods
URL: https://github.com/apache/knox/pull/163#discussion_r333767441
 
 

 ##########
 File path: 
gateway-shell/src/main/java/org/apache/knox/gateway/shell/table/KnoxShellTable.java
 ##########
 @@ -86,6 +96,117 @@ public KnoxShellTable value(Comparable<? extends Object> 
value) {
     return col;
   }
 
+  public Conversions getConversion(Comparable<? extends Object> colIndex) {
+      Conversions type = null;
+
+      if (colIndex instanceof Double) {
+        type = Conversions.DOUBLE;
+      }
+      else if (colIndex instanceof Integer) {
+        type = Conversions.INTEGER;
+      }
+      else if (colIndex instanceof Float) {
+        type = Conversions.FLOAT;
+      }
+      else if (colIndex instanceof Byte) {
+        type = Conversions.BYTE;
+      }
+      else if (colIndex instanceof Short) {
+        type = Conversions.SHORT;
+      }
+      else if (colIndex instanceof Long) {
+        type = Conversions.LONG;
+      }
+      return type;
+    }
+
+    public double[] toDoubleArray(String colName) throws 
IllegalArgumentException {
 
 Review comment:
   Changed to private (no need to be public) and added javadocs to the other 
public methods (mean, median, etc).
 
----------------------------------------------------------------
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]


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

    Worklog Id:     (was: 326623)
    Time Spent: 6h 20m  (was: 6h 10m)

> KnoxShellTable mean, median, and mode methods
> ---------------------------------------------
>
>                 Key: KNOX-2052
>                 URL: https://issues.apache.org/jira/browse/KNOX-2052
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: KnoxShell
>            Reporter: Ljmiv
>            Assignee: Ljmiv
>            Priority: Major
>             Fix For: 1.4.0
>
>          Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> Would be beneficial to be able to get the mean, median, and mode values from 
> columns in a table. No such functions exist as of now. 



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

Reply via email to