smolnar82 commented on a change in pull request #296: KNOX-2240 - KnoxShell 
Custom Command for WEBHDFS Use
URL: https://github.com/apache/knox/pull/296#discussion_r396269512
 
 

 ##########
 File path: 
gateway-shell/src/main/java/org/apache/knox/gateway/shell/table/KnoxShellTable.java
 ##########
 @@ -137,6 +137,10 @@ else if (colIndex instanceof String) {
     double[] colArray = new double[col.size()];
     Conversions conversionMethod = null;
     for (int i = 0; i < col.size(); i++) {
+      Object v = col.get(i);
+      if (v instanceof String && ((String) v).trim().isEmpty()) {
+        col.set(i, "0");
 
 Review comment:
   Why `0` is the default in case the column has no value? Reading the PR 
description I know you are expecting numbers in these columns, but it could be 
any kind of data in other scenarios `DATE`, `TEXT`,...
   What if - to make it more similar to how relational DBs look like - you use 
`NULL`?

----------------------------------------------------------------
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