drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daveoshinsky <...@git.apache.org>
Subject [GitHub] drill pull request #570: DRILL-4834 decimal implementation is vulnerable to ...
Date Wed, 10 Jan 2018 20:07:10 GMT
Github user daveoshinsky commented on a diff in the pull request:

    https://github.com/apache/drill/pull/570#discussion_r160785721
  
    --- Diff: exec/java-exec/src/main/codegen/templates/SqlAccessors.java ---
    @@ -127,6 +127,25 @@ public String getString(int index) {
         }
           <#break>
     
    +    <#case "VarDecimal">
    +
    +    @Override
    +    public String getString(int index){
    +<#if mode=="Nullable">
    +        if(ac.isNull(index)){
    +          return null;
    +        }
    +</#if>
    +        try {
    --- End diff --
    
    The getString method can throw NumberFormatException for BigDecimal, according to javadoc
https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html.  Should it just throw
the exception?  If yes, I';ll remove the try/catch.


---

Mime
View raw message