Github user vvysotskyi commented on a diff in the pull request:
https://github.com/apache/drill/pull/570#discussion_r160941530
--- 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 --
I think it would be better just throw the exception. Then it is easier to
detect a case when data was stored in the vector incorrectly, or if it has come
from the stored data, inform a user that data was corrupted.
---