diff options
Diffstat (limited to 'exec/java-exec/src/main/codegen/templates/CastHigh.java')
-rw-r--r-- | exec/java-exec/src/main/codegen/templates/CastHigh.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/exec/java-exec/src/main/codegen/templates/CastHigh.java b/exec/java-exec/src/main/codegen/templates/CastHigh.java index 26d6be80d..1a876c8a2 100644 --- a/exec/java-exec/src/main/codegen/templates/CastHigh.java +++ b/exec/java-exec/src/main/codegen/templates/CastHigh.java @@ -42,26 +42,30 @@ public class CastHighFunctions { <#list casthigh.types as type> @SuppressWarnings("unused") - @FunctionTemplate(name = "casthigh", scope = FunctionTemplate.FunctionScope.SIMPLE, nulls=NullHandling.NULL_IF_NULL) + @FunctionTemplate(name = "casthigh", + scope = FunctionTemplate.FunctionScope.SIMPLE, + <#if type.from.contains("Decimal")> + returnType = FunctionTemplate.ReturnType.DECIMAL_AGGREGATE, + </#if> + nulls = NullHandling.NULL_IF_NULL) public static class CastHigh${type.from} implements DrillSimpleFunc { @Param ${type.from}Holder in; <#if type.from.contains("Decimal")> - @Output ${type.from}Holder out; + @Output ${type.from}Holder out; <#else> - @Output ${type.to}Holder out; + @Output ${type.to}Holder out; </#if> public void setup() {} public void eval() { - <#if type.value > - out.value = (double) in.value; + <#if type.value> + out.value = (double) in.value; <#else> - out = in; + out = in; </#if> } } </#list> } - |