diff options
125 files changed, 369 insertions, 442 deletions
diff --git a/exec/java-exec/src/main/codegen/templates/AggrBitwiseLogicalTypeFunctions.java b/exec/java-exec/src/main/codegen/templates/AggrBitwiseLogicalTypeFunctions.java index e659d3270..b159421b0 100644 --- a/exec/java-exec/src/main/codegen/templates/AggrBitwiseLogicalTypeFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/AggrBitwiseLogicalTypeFunctions.java @@ -55,7 +55,6 @@ import org.apache.drill.exec.expr.holders.UInt4Holder; import org.apache.drill.exec.expr.holders.NullableUInt4Holder; import org.apache.drill.exec.expr.holders.UInt8Holder; import org.apache.drill.exec.expr.holders.NullableUInt8Holder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -75,7 +74,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace ${type.outputType}Holder inter; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { inter = new ${type.outputType}Holder(); // Initialize the workspace variables diff --git a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java index e4386b221..19a6d46d1 100644 --- a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java +++ b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions1.java @@ -40,7 +40,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.*; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -60,7 +59,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu </#if> @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { value = new ${type.runningType}Holder(); <#if type.inputType?starts_with("Nullable") && type.outputType?starts_with("Nullable")> nonNullCount = new BigIntHolder(); diff --git a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions2.java b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions2.java index fda14571b..6701f098a 100644 --- a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions2.java +++ b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions2.java @@ -41,7 +41,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.*; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -61,7 +60,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace BigIntHolder nonNullCount; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { sum = new ${type.sumRunningType}Holder(); count = new ${type.countRunningType}Holder(); <#if type.inputType?starts_with("Nullable") > diff --git a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions3.java b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions3.java index acf877a34..c005446fb 100644 --- a/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions3.java +++ b/exec/java-exec/src/main/codegen/templates/AggrTypeFunctions3.java @@ -40,7 +40,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.*; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -64,7 +63,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace BigIntHolder nonNullCount; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { avg = new ${type.movingAverageType}Holder(); dev = new ${type.movingDeviationType}Holder(); count = new ${type.countRunningType}Holder(); diff --git a/exec/java-exec/src/main/codegen/templates/CastDateDate.java b/exec/java-exec/src/main/codegen/templates/CastDateDate.java index b849c76df..4a7229760 100644 --- a/exec/java-exec/src/main/codegen/templates/CastDateDate.java +++ b/exec/java-exec/src/main/codegen/templates/CastDateDate.java @@ -48,7 +48,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/CastDateVarChar.java b/exec/java-exec/src/main/codegen/templates/CastDateVarChar.java index c261e29d5..570f367d4 100644 --- a/exec/java-exec/src/main/codegen/templates/CastDateVarChar.java +++ b/exec/java-exec/src/main/codegen/templates/CastDateVarChar.java @@ -57,7 +57,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded((int) len.value); } diff --git a/exec/java-exec/src/main/codegen/templates/CastFunctions.java b/exec/java-exec/src/main/codegen/templates/CastFunctions.java index 41c155796..4e0b4d2eb 100644 --- a/exec/java-exec/src/main/codegen/templates/CastFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/CastFunctions.java @@ -45,7 +45,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <#if (type.from.startsWith("Float") && type.to.endsWith("Int"))> diff --git a/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java b/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java index 57740c956..ec543e347 100644 --- a/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java +++ b/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLen.java @@ -51,7 +51,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <#if type.to == "Float4" || type.to == "Float8"> diff --git a/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLenTargetVarLen.java b/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLenTargetVarLen.java index cd8f7bd43..15d443620 100644 --- a/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLenTargetVarLen.java +++ b/exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLenTargetVarLen.java @@ -49,7 +49,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param BigIntHolder length; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/CastFunctionsTargetVarLen.java b/exec/java-exec/src/main/codegen/templates/CastFunctionsTargetVarLen.java index 455ab13a6..0d6b76a74 100644 --- a/exec/java-exec/src/main/codegen/templates/CastFunctionsTargetVarLen.java +++ b/exec/java-exec/src/main/codegen/templates/CastFunctionsTargetVarLen.java @@ -51,7 +51,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/CastHigh.java b/exec/java-exec/src/main/codegen/templates/CastHigh.java index 934b60b88..082417cab 100644 --- a/exec/java-exec/src/main/codegen/templates/CastHigh.java +++ b/exec/java-exec/src/main/codegen/templates/CastHigh.java @@ -49,7 +49,7 @@ public class CastHighFunctions { @Output ${type.to}Holder out; </#if> - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <#if type.value > diff --git a/exec/java-exec/src/main/codegen/templates/CastIntervalInterval.java b/exec/java-exec/src/main/codegen/templates/CastIntervalInterval.java index e85b724c3..dcc8bc745 100644 --- a/exec/java-exec/src/main/codegen/templates/CastIntervalInterval.java +++ b/exec/java-exec/src/main/codegen/templates/CastIntervalInterval.java @@ -50,7 +50,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -89,7 +89,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/CastIntervalVarChar.java b/exec/java-exec/src/main/codegen/templates/CastIntervalVarChar.java index 829fe47eb..ebc6005e9 100644 --- a/exec/java-exec/src/main/codegen/templates/CastIntervalVarChar.java +++ b/exec/java-exec/src/main/codegen/templates/CastIntervalVarChar.java @@ -55,7 +55,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer.reallocIfNeeded(${type.bufferLength}); } @@ -129,7 +129,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded((int) len.value); } @@ -189,7 +189,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded((int) len.value); } diff --git a/exec/java-exec/src/main/codegen/templates/CastVarCharDate.java b/exec/java-exec/src/main/codegen/templates/CastVarCharDate.java index 41c785509..b6c56124c 100644 --- a/exec/java-exec/src/main/codegen/templates/CastVarCharDate.java +++ b/exec/java-exec/src/main/codegen/templates/CastVarCharDate.java @@ -51,7 +51,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/CastVarCharInterval.java b/exec/java-exec/src/main/codegen/templates/CastVarCharInterval.java index eaebf0240..1304f6366 100644 --- a/exec/java-exec/src/main/codegen/templates/CastVarCharInterval.java +++ b/exec/java-exec/src/main/codegen/templates/CastVarCharInterval.java @@ -50,7 +50,7 @@ public class Cast${type.from}To${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/CastVarCharToNullableNumeric.java b/exec/java-exec/src/main/codegen/templates/CastVarCharToNullableNumeric.java index e417f2625..2b009be51 100644 --- a/exec/java-exec/src/main/codegen/templates/CastVarCharToNullableNumeric.java +++ b/exec/java-exec/src/main/codegen/templates/CastVarCharToNullableNumeric.java @@ -51,7 +51,7 @@ public class CastEmptyString${type.from}ToNullable${type.to} implements DrillSim @Param ${type.from}Holder in; @Output Nullable${type.to}Holder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <#if type.to == "Float4" || type.to == "Float8"> diff --git a/exec/java-exec/src/main/codegen/templates/ComparisonFunctions.java b/exec/java-exec/src/main/codegen/templates/ComparisonFunctions.java index 011d4d940..aed10a2e3 100644 --- a/exec/java-exec/src/main/codegen/templates/ComparisonFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/ComparisonFunctions.java @@ -188,7 +188,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { <@compareBlock mode=typeGroup.mode leftType=leftType rightType=rightType @@ -207,7 +207,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { <@compareBlock mode=typeGroup.mode leftType=leftType rightType=rightType @@ -231,7 +231,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightTypeBase}Holder right; @Output BitHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { @@ -262,7 +262,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightTypeBase}Holder right; @Output BitHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { @@ -293,7 +293,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightTypeBase}Holder right; @Output BitHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { @@ -324,7 +324,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightTypeBase}Holder right; @Output BitHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { @@ -355,7 +355,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightTypeBase}Holder right; @Output BitHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { @@ -388,7 +388,7 @@ public class GCompare${leftTypeBase}Vs${rightTypeBase} { @Param ${rightTypeBase}Holder right; @Output BitHolder out; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/ConvertToNullableHolder.java b/exec/java-exec/src/main/codegen/templates/ConvertToNullableHolder.java index 57efd5e76..68595fc9a 100644 --- a/exec/java-exec/src/main/codegen/templates/ConvertToNullableHolder.java +++ b/exec/java-exec/src/main/codegen/templates/ConvertToNullableHolder.java @@ -42,7 +42,7 @@ public class ${className} implements DrillSimpleFunc { @Param ${minor.class}Holder input; @Output Nullable${minor.class}Holder output; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { output.isSet = 1; diff --git a/exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java b/exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java index 19f9c5921..2a947303f 100644 --- a/exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/CorrelationTypeFunctions.java @@ -86,7 +86,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace ${type.countRunningType}Holder count; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { xMean = new ${type.movingAverageType}Holder(); yMean = new ${type.movingAverageType}Holder(); xyMean = new ${type.movingDeviationType}Holder(); diff --git a/exec/java-exec/src/main/codegen/templates/CovarTypeFunctions.java b/exec/java-exec/src/main/codegen/templates/CovarTypeFunctions.java index b8131c236..e3d2f4a90 100644 --- a/exec/java-exec/src/main/codegen/templates/CovarTypeFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/CovarTypeFunctions.java @@ -88,7 +88,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace ${type.countRunningType}Holder count; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { xMean = new ${type.movingAverageType}Holder(); yMean = new ${type.movingAverageType}Holder(); xyMean = new ${type.movingDeviationType}Holder(); diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalAggrFunctions1.java b/exec/java-exec/src/main/codegen/templates/DateIntervalAggrFunctions1.java index 1c9b76fd6..56e37ced3 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalAggrFunctions1.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalAggrFunctions1.java @@ -40,7 +40,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.*; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -55,7 +54,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace ${type.runningType}Holder value; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { value = new ${type.runningType}Holder(); <#if type.runningType == "Interval"> value.months = ${type.initialValue}; diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java index 6c03f3b81..a550a692c 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateDateArithmeticFunctions.java @@ -50,7 +50,7 @@ public static class G${type}Difference implements DrillSimpleFunc { @Param ${type}Holder right; @Output IntervalDayHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java index 0b0da5290..87470d52f 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateIntervalArithmeticFunctions.java @@ -94,7 +94,7 @@ public class ${datetype}${intervaltype}Functions { @Output ${datetype}Holder out; </#if> - public void setup(RecordBatch incoming) { + public void setup() { <#if datetype == "TimeStampTZ"> temp = new org.joda.time.MutableDateTime(org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.timezoneList[left.index])); <#else> @@ -120,7 +120,7 @@ public class ${datetype}${intervaltype}Functions { <#else> @Output ${datetype}Holder out; </#if> - public void setup(RecordBatch incoming) { + public void setup() { <#if datetype == "TimeStampTZ"> temp = new org.joda.time.MutableDateTime(org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.timezoneList[left.index])); <#else> @@ -142,7 +142,7 @@ public class ${datetype}${intervaltype}Functions { @Workspace org.joda.time.MutableDateTime temp; @Output ${datetype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { <#if datetype == "TimeStampTZ"> temp = new org.joda.time.MutableDateTime(org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.timezoneList[left.index])); <#else> @@ -200,7 +200,7 @@ public class ${datetype}${intervaltype}Functions { @Param ${intervaltype}Holder right; @Output ${datetype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -215,7 +215,7 @@ public class ${datetype}${intervaltype}Functions { @Param ${datetype}Holder left; @Output ${datetype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { <@timeIntervalArithmeticBlock left="left" right="right" temp = "temp" op = "+" output="out.value" intervaltype=intervaltype /> @@ -229,7 +229,7 @@ public class ${datetype}${intervaltype}Functions { @Param ${intervaltype}Holder right; @Output ${datetype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateToCharFunctions.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateToCharFunctions.java index 695cfcf93..4cf63dc37 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateToCharFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateToCharFunctions.java @@ -53,7 +53,7 @@ public class G${type}ToChar implements DrillSimpleFunc { @Workspace org.joda.time.format.DateTimeFormatter format; @Output VarCharHolder out; - public void setup(RecordBatch b) { + public void setup() { temp = new org.joda.time.MutableDateTime(0, org.joda.time.DateTimeZone.UTC); buffer = buffer.reallocIfNeeded(100); diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateTruncFunctions.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateTruncFunctions.java index b9cd0c851..4c60c2505 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateTruncFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/DateTruncFunctions.java @@ -50,7 +50,7 @@ public static class G${type}DateTrunc implements DrillSimpleFunc { @Output ${type}Holder out; @Workspace org.joda.time.MutableDateTime dateTime; - public void setup(RecordBatch incoming) { + public void setup() { dateTime = new org.joda.time.MutableDateTime(org.joda.time.DateTimeZone.UTC); } diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/Extract.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/Extract.java index 0858c3f91..857fece23 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/Extract.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/Extract.java @@ -47,7 +47,7 @@ public class ${className} { </#if> @Workspace org.joda.time.MutableDateTime dateTime; - public void setup(RecordBatch incoming) { + public void setup() { dateTime = new org.joda.time.MutableDateTime(org.joda.time.DateTimeZone.UTC); } @@ -87,7 +87,7 @@ public class ${className} { @Output BigIntHolder out; </#if> - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { <#if fromUnit == "Interval"> diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalIntervalArithmetic.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalIntervalArithmetic.java index 484c8f46c..3a343e5f5 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalIntervalArithmetic.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalIntervalArithmetic.java @@ -51,7 +51,7 @@ public class ${intervaltype}Functions { @Param ${intervaltype}Holder right; @Output ${intervaltype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -75,7 +75,7 @@ public class ${intervaltype}Functions { @Param ${intervaltype}Holder right; @Output ${intervaltype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -97,7 +97,7 @@ public class ${intervaltype}Functions { @Param ${intervaltype}Holder left; @Output ${intervaltype}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalNumericArithmetic.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalNumericArithmetic.java index ce73f7499..8198ce6a6 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalNumericArithmetic.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/IntervalNumericArithmetic.java @@ -96,7 +96,7 @@ public class ${intervaltype}${numerictype}Functions { @Param ${numerictype}Holder right; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -115,7 +115,7 @@ public class ${intervaltype}${numerictype}Functions { @Param ${intervaltype}Holder left; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -134,7 +134,7 @@ public class ${intervaltype}${numerictype}Functions { @Param ${numerictype}Holder right; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToDateTypeFunctions.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToDateTypeFunctions.java index fffaef4b9..baba96369 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToDateTypeFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToDateTypeFunctions.java @@ -46,7 +46,7 @@ public class GTo${type} implements DrillSimpleFunc { @Workspace org.joda.time.format.DateTimeFormatter format; @Output ${type}Holder out; - public void setup(RecordBatch b) { + public void setup() { // Get the desired output format byte[] buf = new byte[right.end - right.start]; right.buffer.getBytes(right.start, buf, 0, right.end - right.start); diff --git a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToTimeStampFunction.java b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToTimeStampFunction.java index 4fd619feb..4d1d09387 100644 --- a/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToTimeStampFunction.java +++ b/exec/java-exec/src/main/codegen/templates/DateIntervalFunctionTemplates/ToTimeStampFunction.java @@ -49,7 +49,7 @@ public class G${numerics}ToTimeStamp implements DrillSimpleFunc { </#if> @Output TimeStampHolder out; - public void setup(RecordBatch b) { + public void setup() { <#if numerics.startsWith("Decimal")> millisConstant = java.math.BigInteger.valueOf(1000); </#if> diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalDenseDecimalSparse.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalDenseDecimalSparse.java index cb0dc5897..4713041b6 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalDenseDecimalSparse.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalDenseDecimalSparse.java @@ -52,7 +52,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); } diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalFloat.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalFloat.java index 4d8d1a554..c85cc4f20 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalFloat.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalFloat.java @@ -46,7 +46,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -84,7 +84,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalInt.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalInt.java index c435f6da1..318a8d8a3 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalInt.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalInt.java @@ -49,7 +49,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -89,7 +89,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param ${type.from}Holder in; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSimilar.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSimilar.java index cd2c39090..f9b743017 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSimilar.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSimilar.java @@ -54,7 +54,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); } diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSparseDecimalDense.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSparseDecimalDense.java index 0f8790f86..a94eb129f 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSparseDecimalDense.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalSparseDecimalDense.java @@ -52,7 +52,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); } diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalVarchar.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalVarchar.java index ed624442d..d9d15e11e 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalVarchar.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDecimalVarchar.java @@ -55,7 +55,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(${type.bufferSize}); } @@ -136,7 +136,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded((int) len.value); } diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastDownwardDecimal.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastDownwardDecimal.java index bd8681933..05c99362a 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastDownwardDecimal.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastDownwardDecimal.java @@ -52,7 +52,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -125,7 +125,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -169,7 +169,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Inject DrillBuf buffer; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); } diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastFloatDecimal.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastFloatDecimal.java index c05b2e559..8a7919cd1 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastFloatDecimal.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastFloatDecimal.java @@ -58,7 +58,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { <#if type.major == "FloatDecimalComplex" || type.major == "DoubleDecimalComplex"> int size = ${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize); buffer = buffer.reallocIfNeeded(size); diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastIntDecimal.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastIntDecimal.java index 139fff889..2393db873 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastIntDecimal.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastIntDecimal.java @@ -54,7 +54,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { <#if type.to.startsWith("Decimal28") || type.to.startsWith("Decimal38")> int size = ${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize); buffer = buffer.reallocIfNeeded(size); diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastSrcDecimalSimple.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastSrcDecimalSimple.java index 7750c62b0..40b03a13a 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastSrcDecimalSimple.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastSrcDecimalSimple.java @@ -56,7 +56,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); } @@ -158,7 +158,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc{ @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); } @@ -257,7 +257,7 @@ public class Cast${type.from}${type.to} implements DrillSimpleFunc { @Param BigIntHolder scale; @Output ${type.to}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/CastVarCharDecimal.java b/exec/java-exec/src/main/codegen/templates/Decimal/CastVarCharDecimal.java index 84be392fe..53c0cf984 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/CastVarCharDecimal.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/CastVarCharDecimal.java @@ -66,7 +66,7 @@ public class CastEmptyString${type.from}ToNullable${type.to} implements DrillSim @Output Nullable${type.to}Holder out; </#if> - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -240,7 +240,7 @@ public class CastEmptyString${type.from}ToNullable${type.to} implements DrillSim @Output Nullable${type.to}Holder out; </#if> - public void setup(RecordBatch incoming) { + public void setup() { int size = ${type.arraySize} * (org.apache.drill.exec.util.DecimalUtility.integerSize); buffer = buffer.reallocIfNeeded(size); } diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java index 54cec1000..974db9bdd 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java @@ -74,7 +74,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu </#if> @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { <#if aggrtype.funcName == "count"> value = new ${type.runningType}Holder(); value.value = 0; diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java index 7277e19c7..5a1b04a7a 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions2.java @@ -65,7 +65,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace IntHolder outputScale; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { buffer.reallocIfNeeded(${type.outputType}Holder.WIDTH); value = new ObjectHolder(); value.obj = java.math.BigDecimal.ZERO; diff --git a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalFunctions.java b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalFunctions.java index b9029cd93..8d5f1a3ae 100644 --- a/exec/java-exec/src/main/codegen/templates/Decimal/DecimalFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/Decimal/DecimalFunctions.java @@ -140,7 +140,7 @@ public class ${type.name}Functions { @Workspace int outputPrecision; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.storage} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); outputPrecision = Integer.MIN_VALUE; @@ -178,7 +178,7 @@ public class ${type.name}Functions { @Inject DrillBuf buffer; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.storage} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); outputPrecision = Integer.MIN_VALUE; @@ -217,7 +217,7 @@ public class ${type.name}Functions { @Workspace int outputPrecision; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.storage} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); tempResult = new int[${type.storage} * ${type.storage}]; @@ -386,7 +386,7 @@ public class ${type.name}Functions { @Workspace int outputScale; @Workspace int outputPrecision; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.storage} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); outputPrecision = Integer.MIN_VALUE; @@ -423,7 +423,7 @@ public class ${type.name}Functions { @Workspace int outputScale; @Workspace int outputPrecision; - public void setup(RecordBatch incoming) { + public void setup() { int size = (${type.storage} * (org.apache.drill.exec.util.DecimalUtility.integerSize)); buffer = buffer.reallocIfNeeded(size); outputPrecision = Integer.MIN_VALUE; @@ -456,7 +456,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -477,7 +477,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { @@ -502,7 +502,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -568,7 +568,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -633,7 +633,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -668,7 +668,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param IntHolder right; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -744,7 +744,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -807,7 +807,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param IntHolder right; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -839,7 +839,7 @@ public class ${type.name}Functions { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@compareBlock leftType=leftType rightType=rightType absCompare="false" output="out.value" nullCompare=true nullComparesHigh=true /> @@ -859,7 +859,7 @@ public class ${type.name}Functions { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@compareBlock leftType=leftType rightType=rightType absCompare="false" output="out.value" nullCompare=true nullComparesHigh=false /> @@ -880,7 +880,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp; @@ -902,7 +902,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp; @@ -922,7 +922,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp; @@ -942,7 +942,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp; @@ -962,7 +962,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp; @@ -982,7 +982,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp; @@ -1034,7 +1034,7 @@ public class ${type.name}Functions { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { outside: @@ -1057,7 +1057,7 @@ public class ${type.name}Functions { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { outside: @@ -1083,7 +1083,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp = org.apache.drill.exec.util.DecimalUtility.compareDenseBytes(left.buffer, left.start, left.getSign(left.start, left.buffer), right.buffer, right.start, right.getSign(right.start, right.buffer), left.WIDTH); @@ -1101,7 +1101,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp = org.apache.drill.exec.util.DecimalUtility.compareDenseBytes(left.buffer, left.start, left.getSign(left.start, left.buffer), right.buffer, right.start, right.getSign(right.start, right.buffer), left.WIDTH); @@ -1119,7 +1119,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp = org.apache.drill.exec.util.DecimalUtility.compareDenseBytes(left.buffer, left.start, left.getSign(left.start, left.buffer), right.buffer, right.start, right.getSign(right.start, right.buffer), left.WIDTH); @@ -1137,7 +1137,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp = org.apache.drill.exec.util.DecimalUtility.compareDenseBytes(left.buffer, left.start, left.getSign(left.start, left.buffer), right.buffer, right.start, right.getSign(right.start, right.buffer), left.WIDTH); @@ -1155,7 +1155,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { int cmp = org.apache.drill.exec.util.DecimalUtility.compareDenseBytes(left.buffer, left.start, left.getSign(left.start, left.buffer), right.buffer, right.start, right.getSign(right.start, right.buffer), left.WIDTH); @@ -1174,7 +1174,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { @@ -1220,7 +1220,7 @@ public class ${type.name}Functions { @Workspace int outputPrecision; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { outputPrecision = Integer.MIN_VALUE; } @@ -1249,7 +1249,7 @@ public class ${type.name}Functions { @Workspace int outputPrecision; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { outputPrecision = Integer.MIN_VALUE; } @@ -1276,7 +1276,7 @@ public class ${type.name}Functions { @Workspace int outputPrecision; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { outputPrecision = Integer.MIN_VALUE; } @@ -1299,7 +1299,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.precision = out.maxPrecision; @@ -1322,7 +1322,7 @@ public class ${type.name}Functions { @Workspace int outputScale; @Workspace int outputPrecision; - public void setup(RecordBatch incoming) { + public void setup() { outputPrecision = Integer.MIN_VALUE; } @@ -1355,7 +1355,7 @@ public class ${type.name}Functions { @Workspace int outputPrecision; @Output ${type.name}Holder result; - public void setup(RecordBatch incoming) { + public void setup() { outputPrecision = Integer.MIN_VALUE; } @@ -1384,7 +1384,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { @@ -1398,7 +1398,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { @@ -1415,7 +1415,7 @@ public class ${type.name}Functions { @Param IntHolder right; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { @@ -1431,7 +1431,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -1458,7 +1458,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -1483,7 +1483,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder in; @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -1520,7 +1520,7 @@ public class ${type.name}Functions { @Output ${type.name}Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -1578,7 +1578,7 @@ public class ${type.name}Functions { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { outside: @@ -1602,7 +1602,7 @@ public class ${type.name}Functions { @Param ${rightType}Holder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { outside: @@ -1627,7 +1627,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@adjustScale javaType=type.storage leftType="leftType" rightType="rightType"/> @@ -1645,7 +1645,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@adjustScale javaType=type.storage leftType="leftType" rightType="rightType"/> @@ -1663,7 +1663,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@adjustScale javaType=type.storage leftType="leftType" rightType="rightType"/> @@ -1681,7 +1681,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@adjustScale javaType=type.storage leftType="leftType" rightType="rightType"/> @@ -1699,7 +1699,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@adjustScale javaType=type.storage leftType="leftType" rightType="rightType"/> @@ -1718,7 +1718,7 @@ public class ${type.name}Functions { @Param ${type.name}Holder left; @Param ${type.name}Holder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { <@adjustScale javaType=type.storage leftType="leftType" rightType="rightType"/> diff --git a/exec/java-exec/src/main/codegen/templates/IntervalAggrFunctions2.java b/exec/java-exec/src/main/codegen/templates/IntervalAggrFunctions2.java index c7f591813..b29fa08d8 100644 --- a/exec/java-exec/src/main/codegen/templates/IntervalAggrFunctions2.java +++ b/exec/java-exec/src/main/codegen/templates/IntervalAggrFunctions2.java @@ -41,7 +41,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.*; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -60,7 +59,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu @Workspace ${type.countRunningType}Holder count; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { sum = new ${type.sumRunningType}Holder(); count = new ${type.countRunningType}Holder(); sum.value = 0; diff --git a/exec/java-exec/src/main/codegen/templates/MathFunctionTemplates.java b/exec/java-exec/src/main/codegen/templates/MathFunctionTemplates.java index 9ec21785e..a1e0375af 100644 --- a/exec/java-exec/src/main/codegen/templates/MathFunctionTemplates.java +++ b/exec/java-exec/src/main/codegen/templates/MathFunctionTemplates.java @@ -58,7 +58,7 @@ public class ${inputType.className}Functions { @Param ${type.input2}Holder in2; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/MathFunctions.java b/exec/java-exec/src/main/codegen/templates/MathFunctions.java index fa5f1ac75..ba5b76c96 100644 --- a/exec/java-exec/src/main/codegen/templates/MathFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/MathFunctions.java @@ -62,7 +62,7 @@ public class GMathFunctions{ @Param ${type.input}Holder in; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -97,7 +97,7 @@ public class GMathFunctions{ @Param ${type.input}Holder input2; @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -128,7 +128,7 @@ public class GMathFunctions{ @Param IntHolder input2; @Output Float8Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -198,7 +198,7 @@ public static class ${func.className}${type.input} implements DrillSimpleFunc { @Param ${type.input}Holder in; @Output ${func.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -228,7 +228,7 @@ public static class ${func.className}${type.input} implements DrillSimpleFunc { @Param ${type.input}Holder val; @Output ${func.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -297,7 +297,7 @@ public class TrigoMathFunctions{ @Param ${type.input}Holder in; @Output ${func.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/codegen/templates/NullOperator.java b/exec/java-exec/src/main/codegen/templates/NullOperator.java index 73eda1ab0..1c9ad32a0 100644 --- a/exec/java-exec/src/main/codegen/templates/NullOperator.java +++ b/exec/java-exec/src/main/codegen/templates/NullOperator.java @@ -41,7 +41,7 @@ public class ${className} { @Param ${mode.prefix}${minor.class}Holder input; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { <#if mode.name == "Optional"> @@ -58,7 +58,7 @@ public class ${className} { @Param ${mode.prefix}${minor.class}Holder input; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { <#if mode.name == "Optional"> diff --git a/exec/java-exec/src/main/codegen/templates/NumericFunctionsTemplates.java b/exec/java-exec/src/main/codegen/templates/NumericFunctionsTemplates.java index 65ac923c7..4d06c6820 100644 --- a/exec/java-exec/src/main/codegen/templates/NumericFunctionsTemplates.java +++ b/exec/java-exec/src/main/codegen/templates/NumericFunctionsTemplates.java @@ -81,7 +81,7 @@ public static class ${type.inputType}${numericFunc.className} implements DrillSi @Workspace java.util.regex.Matcher matcher; </#if> - public void setup(RecordBatch b) { + public void setup() { <#if type.intype != "numeric"> pattern = java.util.regex.Pattern.compile("[-+]?\\d+(\\.\\d+)?"); matcher = pattern.matcher(""); diff --git a/exec/java-exec/src/main/codegen/templates/NumericToCharFunctions.java b/exec/java-exec/src/main/codegen/templates/NumericToCharFunctions.java index ff2c675d5..8bfe5120d 100644 --- a/exec/java-exec/src/main/codegen/templates/NumericToCharFunctions.java +++ b/exec/java-exec/src/main/codegen/templates/NumericToCharFunctions.java @@ -55,7 +55,7 @@ public class G${type}ToChar implements DrillSimpleFunc { @Workspace java.text.NumberFormat outputFormat; @Output VarCharHolder out; - public void setup(RecordBatch b) { + public void setup() { buffer = buffer.reallocIfNeeded(100); byte[] buf = new byte[right.end - right.start]; right.buffer.getBytes(right.start, buf, 0, right.end - right.start); diff --git a/exec/java-exec/src/main/codegen/templates/SumZeroAggr.java b/exec/java-exec/src/main/codegen/templates/SumZeroAggr.java index 5b0c4a0cf..87393f7c2 100644 --- a/exec/java-exec/src/main/codegen/templates/SumZeroAggr.java +++ b/exec/java-exec/src/main/codegen/templates/SumZeroAggr.java @@ -37,7 +37,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.*; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @@ -54,7 +53,7 @@ public class SumZeroFunctions { @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { value.value = 0; } diff --git a/exec/java-exec/src/main/codegen/templates/VarCharAggrFunctions1.java b/exec/java-exec/src/main/codegen/templates/VarCharAggrFunctions1.java index 01b556546..53474eaa6 100644 --- a/exec/java-exec/src/main/codegen/templates/VarCharAggrFunctions1.java +++ b/exec/java-exec/src/main/codegen/templates/VarCharAggrFunctions1.java @@ -69,7 +69,7 @@ public static class ${type.inputType}${aggrtype.className} implements DrillAggFu </#if> @Output ${type.outputType}Holder out; - public void setup(RecordBatch b) { + public void setup() { <#if aggrtype.funcName == "max" || aggrtype.funcName == "min"> init = new UInt1Holder(); init.value = 0; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillAggFunc.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillAggFunc.java index b29410daa..21599f655 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillAggFunc.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillAggFunc.java @@ -19,8 +19,16 @@ package org.apache.drill.exec.expr; import org.apache.drill.exec.record.RecordBatch; +/** + * Aggregate function interface. + * + */ public interface DrillAggFunc extends DrillFunc{ - public void setup(RecordBatch incoming); + /** + * Initialization for the beginning of the aggregation. + * + */ + public void setup(); public void add(); public void output(); public void reset(); diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillSimpleFunc.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillSimpleFunc.java index 8821c63d8..40817f2cd 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillSimpleFunc.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/DrillSimpleFunc.java @@ -20,6 +20,6 @@ package org.apache.drill.exec.expr; import org.apache.drill.exec.record.RecordBatch; public interface DrillSimpleFunc extends DrillFunc{ - public void setup(RecordBatch incoming); + public void setup(); public void eval(); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/AggregateErrorFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/AggregateErrorFunctions.java index 48a6625d8..a95a1c342 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/AggregateErrorFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/AggregateErrorFunctions.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; public class AggregateErrorFunctions { @@ -36,7 +35,7 @@ public class AggregateErrorFunctions { @Workspace BigIntHolder value; @Output BigIntHolder out; - public void setup(RecordBatch b) { + public void setup() { if (true) { throw new RuntimeException("Only COUNT aggregate function supported for Boolean type"); } @@ -63,7 +62,7 @@ public class AggregateErrorFunctions { @Workspace BigIntHolder value; @Output BigIntHolder out; - public void setup(RecordBatch b) { + public void setup() { if (true) { throw new RuntimeException("Only COUNT aggregate function supported for Boolean type"); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Alternator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Alternator.java index 93504291a..fc880f2ac 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Alternator.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Alternator.java @@ -23,7 +23,6 @@ import org.apache.drill.exec.expr.annotations.FunctionTemplate.FunctionScope; import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BigIntHolder; -import org.apache.drill.exec.record.RecordBatch; public class Alternator { @@ -32,7 +31,7 @@ public class Alternator { @Workspace int val; @Output BigIntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { val = 0; } @@ -52,7 +51,7 @@ public class Alternator { @Workspace int val; @Output BigIntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { val = 0; } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BitFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BitFunctions.java index ae428726a..c44a6b7ca 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BitFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BitFunctions.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.IntHolder; -import org.apache.drill.exec.record.RecordBatch; /** * Function templates for Bit/BOOLEAN functions other than comparison @@ -44,7 +43,7 @@ public class BitFunctions { @Param BitHolder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = left.value | right.value; @@ -60,7 +59,7 @@ public class BitFunctions { @Param BitHolder right; @Output BitHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = left.value & right.value; @@ -77,7 +76,7 @@ public class BitFunctions { @Param IntHolder right; @Output IntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = left.value ^ right.value; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BooleanAggrFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BooleanAggrFunctions.java index d555fadc2..ae67606f1 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BooleanAggrFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/BooleanAggrFunctions.java @@ -31,7 +31,6 @@ import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") public class BooleanAggrFunctions { @@ -45,7 +44,7 @@ public static class BitBooleanOr implements DrillAggFunc{ @Workspace BitHolder inter; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { inter = new BitHolder(); // Initialize the workspace variables @@ -77,7 +76,7 @@ public static class NullableBitBooleanOr implements DrillAggFunc{ @Workspace BitHolder inter; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { inter = new BitHolder(); // Initialize the workspace variables @@ -116,7 +115,7 @@ public static class BitBooleanAnd implements DrillAggFunc{ @Workspace BitHolder inter; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { inter = new BitHolder(); // Initialize the workspace variables @@ -149,7 +148,7 @@ public static class NullableBitBooleanAnd implements DrillAggFunc{ @Workspace BitHolder inter; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { inter = new BitHolder(); // Initialize the workspace variables diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ByteSubstring.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ByteSubstring.java index 8831d98ad..381f46c82 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ByteSubstring.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/ByteSubstring.java @@ -23,7 +23,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; // TODO: implement optional length parameter @@ -52,7 +51,7 @@ public class ByteSubstring implements DrillSimpleFunc { @Output VarBinaryHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntDate.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntDate.java index 9c0703e42..b510678b5 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntDate.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntDate.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.DateHolder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @FunctionTemplate(names = {"castDATE", "to_date"}, scope = FunctionTemplate.FunctionScope.SIMPLE, nulls= NullHandling.NULL_IF_NULL) @@ -36,7 +35,7 @@ public class CastBigIntDate implements DrillSimpleFunc { DateHolder out; @Override - public void setup(RecordBatch incoming) { + public void setup() { } @Override diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStamp.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStamp.java index ea92f3c33..dbd814bea 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStamp.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStamp.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.TimeStampHolder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @FunctionTemplate(name = "castTIMESTAMP", scope = FunctionTemplate.FunctionScope.SIMPLE, nulls= NullHandling.NULL_IF_NULL) @@ -36,7 +35,7 @@ public class CastBigIntTimeStamp implements DrillSimpleFunc { TimeStampHolder out; @Override - public void setup(RecordBatch incoming) { + public void setup() { } @Override diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStampTZ.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStampTZ.java index 014a4d469..d8ba5f44e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStampTZ.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastBigIntTimeStampTZ.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.TimeStampTZHolder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @FunctionTemplate(names = {"castTIMESTAMPTZ", "to_timestamptz"}, scope = FunctionTemplate.FunctionScope.SIMPLE, nulls= NullHandling.NULL_IF_NULL) @@ -39,7 +38,7 @@ public class CastBigIntTimeStampTZ implements DrillSimpleFunc { TimeStampTZHolder out; @Override - public void setup(RecordBatch incoming) { + public void setup() { org.joda.time.DateTime temp = new org.joda.time.DateTime(); // Store the local time zone index diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastIntTime.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastIntTime.java index f4a4ed028..8962af8f0 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastIntTime.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastIntTime.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.TimeHolder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @FunctionTemplate(names = {"castTIME", "to_time"}, scope = FunctionTemplate.FunctionScope.SIMPLE, nulls= NullHandling.NULL_IF_NULL) @@ -36,7 +35,7 @@ public class CastIntTime implements DrillSimpleFunc { TimeHolder out; @Override - public void setup(RecordBatch incoming) { + public void setup() { } @Override diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastVarCharVar16Char.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastVarCharVar16Char.java index 528071760..99976a7fd 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastVarCharVar16Char.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CastVarCharVar16Char.java @@ -32,7 +32,6 @@ import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.Var16CharHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; @SuppressWarnings("unused") @FunctionTemplate(names = {"castVAR16CHAR", "to_var16char", "to_string"}, scope = FunctionTemplate.FunctionScope.SIMPLE, nulls= NullHandling.NULL_IF_NULL) @@ -44,7 +43,7 @@ public class CastVarCharVar16Char implements DrillSimpleFunc { @Inject DrillBuf buffer; @Override - public void setup(RecordBatch incoming) { + public void setup() { charset = java.nio.charset.Charset.forName("UTF-16"); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java index 62e9d701a..38342c6a6 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java @@ -23,7 +23,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; /** * Evaluate a substring expression for a given UTF-8 value; specifying the start @@ -56,7 +55,7 @@ public class CharSubstring implements DrillSimpleFunc { @Output VarCharHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/DateTypeFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/DateTypeFunctions.java index cc4be8980..d43ba2ad2 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/DateTypeFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/DateTypeFunctions.java @@ -37,7 +37,6 @@ import org.apache.drill.exec.expr.holders.TimeHolder; import org.apache.drill.exec.expr.holders.TimeStampHolder; import org.apache.drill.exec.expr.holders.TimeStampTZHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; public class DateTypeFunctions { @@ -53,7 +52,7 @@ public class DateTypeFunctions { @Param BigIntHolder inputMilliSeconds; @Output IntervalHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -75,7 +74,7 @@ public class DateTypeFunctions { @Param BigIntHolder inputMonths; @Output IntervalYearHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -95,7 +94,7 @@ public class DateTypeFunctions { @Param BigIntHolder inputMillis; @Output IntervalDayHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -116,7 +115,7 @@ public class DateTypeFunctions { @Param BigIntHolder inputDays; @Output DateHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -143,7 +142,7 @@ public class DateTypeFunctions { @Param BigIntHolder inputMilliSeconds; @Output TimeStampHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -171,7 +170,7 @@ public class DateTypeFunctions { @Param VarCharHolder inputTimeZone; @Output TimeStampTZHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -199,7 +198,7 @@ public class DateTypeFunctions { @Param BigIntHolder inputMilliSeconds; @Output TimeHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -215,13 +214,13 @@ public class DateTypeFunctions { @Workspace long queryStartDate; @Output DateHolder out; - public void setup(RecordBatch incoming) { + public void setup() { - int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); - org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); - org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); - queryStartDate = (new org.joda.time.DateMidnight(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), timeZone)). - withZoneRetainFields(org.joda.time.DateTimeZone.UTC).getMillis(); +// int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); +// org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); +// org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); +// queryStartDate = (new org.joda.time.DateMidnight(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), timeZone)). +// withZoneRetainFields(org.joda.time.DateTimeZone.UTC).getMillis(); } public void eval() { @@ -236,13 +235,13 @@ public class DateTypeFunctions { @Workspace int timezoneIndex; @Output TimeStampTZHolder out; - public void setup(RecordBatch incoming) { + public void setup() { - int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); - org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); - org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); - queryStartDate = now.getMillis(); - timezoneIndex = org.apache.drill.exec.expr.fn.impl.DateUtility.getIndex(now.getZone().toString()); +// int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); +// org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); +// org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); +// queryStartDate = now.getMillis(); +// timezoneIndex = org.apache.drill.exec.expr.fn.impl.DateUtility.getIndex(now.getZone().toString()); } public void eval() { @@ -257,7 +256,7 @@ public class DateTypeFunctions { @Workspace int timezoneIndex; @Output TimeStampTZHolder out; - public void setup(RecordBatch incoming) { + public void setup() { org.joda.time.DateTime now = new org.joda.time.DateTime(); timezoneIndex = org.apache.drill.exec.expr.fn.impl.DateUtility.getIndex(now.getZone().toString()); } @@ -274,7 +273,7 @@ public class DateTypeFunctions { @Inject DrillBuf buffer; @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -292,10 +291,10 @@ public class DateTypeFunctions { @Workspace long queryStartDate; @Output TimeStampHolder out; - public void setup(RecordBatch incoming) { + public void setup() { - org.joda.time.DateTime now = (new org.joda.time.DateTime(incoming.getContext().getQueryStartTime())).withZoneRetainFields(org.joda.time.DateTimeZone.UTC); - queryStartDate = now.getMillis(); +// org.joda.time.DateTime now = (new org.joda.time.DateTime(incoming.getContext().getQueryStartTime())).withZoneRetainFields(org.joda.time.DateTimeZone.UTC); +// queryStartDate = now.getMillis(); } public void eval() { @@ -308,15 +307,15 @@ public class DateTypeFunctions { @Workspace int queryStartTime; @Output TimeHolder out; - public void setup(RecordBatch incoming) { + public void setup() { - int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); - org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); - org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); - queryStartTime= (int) ((now.getHourOfDay() * org.apache.drill.exec.expr.fn.impl.DateUtility.hoursToMillis) + - (now.getMinuteOfHour() * org.apache.drill.exec.expr.fn.impl.DateUtility.minutesToMillis) + - (now.getSecondOfMinute() * org.apache.drill.exec.expr.fn.impl.DateUtility.secondsToMillis) + - (now.getMillisOfSecond())); +// int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); +// org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); +// org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); +// queryStartTime= (int) ((now.getHourOfDay() * org.apache.drill.exec.expr.fn.impl.DateUtility.hoursToMillis) + +// (now.getMinuteOfHour() * org.apache.drill.exec.expr.fn.impl.DateUtility.minutesToMillis) + +// (now.getSecondOfMinute() * org.apache.drill.exec.expr.fn.impl.DateUtility.secondsToMillis) + +// (now.getMillisOfSecond())); } public void eval() { @@ -331,7 +330,7 @@ public class DateTypeFunctions { @Param TimeHolder right; @Output TimeStampHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -346,7 +345,7 @@ public class DateTypeFunctions { @Param DateHolder left; @Output TimeStampHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -365,7 +364,7 @@ public class DateTypeFunctions { @Param DateHolder right; @Output BigIntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -382,7 +381,7 @@ public class DateTypeFunctions { @Param TimeStampHolder right; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -401,11 +400,11 @@ public class DateTypeFunctions { @Workspace long queryStartDate; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { - int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); - org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); - org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); - queryStartDate = (new org.joda.time.DateMidnight(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), timeZone)).getMillis(); + public void setup() { +// int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); +// org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); +// org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); +// queryStartDate = (new org.joda.time.DateMidnight(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), timeZone)).getMillis(); } public void eval() { @@ -424,7 +423,7 @@ public class DateTypeFunctions { @Param DateHolder right; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -443,11 +442,11 @@ public class DateTypeFunctions { @Workspace long queryStartDate; @Output IntervalHolder out; - public void setup(RecordBatch incoming) { - int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); - org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); - org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); - queryStartDate = (new org.joda.time.DateMidnight(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), timeZone)).getMillis(); + public void setup() { +// int timeZoneIndex = incoming.getContext().getRootFragmentTimeZone(); +// org.joda.time.DateTimeZone timeZone = org.joda.time.DateTimeZone.forID(org.apache.drill.exec.expr.fn.impl.DateUtility.getTimeZone(timeZoneIndex)); +// org.joda.time.DateTime now = new org.joda.time.DateTime(incoming.getContext().getQueryStartTime(), timeZone); +// queryStartDate = (new org.joda.time.DateMidnight(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), timeZone)).getMillis(); } public void eval() { @@ -465,7 +464,7 @@ public class DateTypeFunctions { @Output TimeHolder out; @Override - public void setup(RecordBatch incoming) { + public void setup() { } @Override @@ -480,8 +479,8 @@ public class DateTypeFunctions { @Workspace long queryStartDate; @Override - public void setup(RecordBatch incoming) { - queryStartDate = incoming.getContext().getQueryStartTime(); + public void setup() { +// queryStartDate = incoming.getContext().getQueryStartTime(); } @Override @@ -498,7 +497,7 @@ public class DateTypeFunctions { @Workspace org.joda.time.format.DateTimeFormatter formatter; @Override - public void setup(RecordBatch incoming) { + public void setup() { formatter = org.joda.time.format.DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); } @@ -519,7 +518,7 @@ public class DateTypeFunctions { @Workspace org.joda.time.format.DateTimeFormatter formatter; @Override - public void setup(RecordBatch incoming) { + public void setup() { String pattern = org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(inputPattern.start, inputPattern.end, inputPattern.buffer); formatter = org.joda.time.format.DateTimeFormat.forPattern(pattern); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/HashFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/HashFunctions.java index 9658fdb18..46fed6f39 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/HashFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/HashFunctions.java @@ -54,7 +54,6 @@ import org.apache.drill.exec.expr.holders.TimeStampTZHolder; import org.apache.drill.exec.expr.holders.Var16CharHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; public class HashFunctions { @@ -64,7 +63,7 @@ public class HashFunctions { @Param NullableFloat4Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -82,7 +81,7 @@ public class HashFunctions { @Param Float4Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -96,7 +95,7 @@ public class HashFunctions { @Param NullableFloat8Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -114,7 +113,7 @@ public class HashFunctions { @Param Float8Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -128,7 +127,7 @@ public class HashFunctions { @Param NullableVarBinaryHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -146,7 +145,7 @@ public class HashFunctions { @Param NullableVarCharHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -164,7 +163,7 @@ public class HashFunctions { @Param NullableVar16CharHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -182,7 +181,7 @@ public class HashFunctions { @Param NullableBigIntHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -200,7 +199,7 @@ public class HashFunctions { @Param NullableIntHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -219,7 +218,7 @@ public class HashFunctions { @Param VarBinaryHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -233,7 +232,7 @@ public class HashFunctions { @Param VarCharHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -247,7 +246,7 @@ public class HashFunctions { @Param Var16CharHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -261,7 +260,7 @@ public class HashFunctions { @Param BigIntHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -274,7 +273,7 @@ public class HashFunctions { @Param IntHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -287,7 +286,7 @@ public class HashFunctions { @Param DateHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -300,7 +299,7 @@ public class HashFunctions { @Param NullableDateHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -317,7 +316,7 @@ public class HashFunctions { @Param TimeStampHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -330,7 +329,7 @@ public class HashFunctions { @Param NullableTimeStampHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -347,7 +346,7 @@ public class HashFunctions { @Param TimeHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -360,7 +359,7 @@ public class HashFunctions { @Param NullableTimeHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -377,7 +376,7 @@ public class HashFunctions { @Param TimeStampTZHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -390,7 +389,7 @@ public class HashFunctions { @Param NullableTimeStampTZHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -407,7 +406,7 @@ public class HashFunctions { @Param Decimal9Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -420,7 +419,7 @@ public class HashFunctions { @Param NullableDecimal9Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -437,7 +436,7 @@ public class HashFunctions { @Param Decimal18Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -450,7 +449,7 @@ public class HashFunctions { @Param NullableDecimal18Holder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -467,7 +466,7 @@ public class HashFunctions { @Param Decimal28SparseHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -485,7 +484,7 @@ public class HashFunctions { @Param NullableDecimal28SparseHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -506,7 +505,7 @@ public class HashFunctions { @Param Decimal38SparseHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -524,7 +523,7 @@ public class HashFunctions { @Param NullableDecimal38SparseHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -546,7 +545,7 @@ public class HashFunctions { @Param NullableBitHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -564,7 +563,7 @@ public class HashFunctions { @Param BitHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsFalse.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsFalse.java index 12a2205ef..15c3c01d4 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsFalse.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsFalse.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; public class IsFalse { @@ -34,7 +33,7 @@ public class IsFalse { @Param NullableBitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { if (in.isSet == 0) { @@ -51,7 +50,7 @@ public class IsFalse { @Param BitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = in.value == 0 ? 1 : 0; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotFalse.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotFalse.java index 5b8a9bd31..32c91e03b 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotFalse.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotFalse.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; public class IsNotFalse { @@ -34,7 +33,7 @@ public class IsNotFalse { @Param NullableBitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { if (in.isSet == 0) { @@ -51,7 +50,7 @@ public class IsNotFalse { @Param BitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = in.value; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotTrue.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotTrue.java index 1485e8cd6..2d5e7ef80 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotTrue.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotTrue.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; public class IsNotTrue { @@ -34,7 +33,7 @@ public class IsNotTrue { @Param NullableBitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { if (in.isSet == 0) { @@ -51,7 +50,7 @@ public class IsNotTrue { @Param BitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = in.value == 0 ? 1 : 0; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsTrue.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsTrue.java index 2fd65e31b..9a1f6e852 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsTrue.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsTrue.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; public class IsTrue { @@ -34,7 +33,7 @@ public class IsTrue { @Param NullableBitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { if (in.isSet == 0) { @@ -51,7 +50,7 @@ public class IsTrue { @Param BitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = in.value; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Mappify.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Mappify.java index da9009cf5..bbd9e370c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Mappify.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Mappify.java @@ -22,7 +22,6 @@ import org.apache.drill.exec.expr.DrillSimpleFunc; import org.apache.drill.exec.expr.annotations.FunctionTemplate; import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; -import org.apache.drill.exec.record.RecordBatch; import org.apache.drill.exec.vector.complex.reader.FieldReader; import org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter; @@ -57,7 +56,7 @@ public class Mappify { @Inject DrillBuf buffer; @Output ComplexWriter writer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java index 39288b4a1..0d5cd925d 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/MathFunctions.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.Float8Holder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; public class MathFunctions{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MathFunctions.class); @@ -42,7 +41,7 @@ public class MathFunctions{ @Param BigIntHolder input; @Output BigIntHolder out; - public void setup(RecordBatch b){} + public void setup(){} public void eval(){ out.value = -input.value; @@ -58,7 +57,7 @@ public class MathFunctions{ @Param Float8Holder b; @Output Float8Holder out; - public void setup(RecordBatch b){} + public void setup(){} public void eval(){ out.value = java.lang.Math.pow(a.value, b.value); @@ -71,7 +70,7 @@ public class MathFunctions{ public static class Random implements DrillSimpleFunc{ @Output Float8Holder out; - public void setup(RecordBatch b){} + public void setup(){} public void eval(){ out.value = java.lang.Math.random(); @@ -87,7 +86,7 @@ public class MathFunctions{ @Workspace int decimalDigits; @Output Float8Holder out; - public void setup(RecordBatch b) { + public void setup() { byte[] buf = new byte[right.end - right.start]; right.buffer.getBytes(right.start, buf, 0, right.end - right.start); inputFormat = new DecimalFormat(new String(buf)); @@ -115,7 +114,7 @@ public class MathFunctions{ @Output Float8Holder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Not.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Not.java index db3324752..a45f9dd50 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Not.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/Not.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.NullableBitHolder; -import org.apache.drill.exec.record.RecordBatch; public class Not { @@ -35,7 +34,7 @@ public class Not { @Param NullableBitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = (in.value == 0 ? 1 : 0); @@ -48,7 +47,7 @@ public class Not { @Param BitHolder in; @Output BitHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = in.value == 0 ? 1 : 0; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleCastFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleCastFunctions.java index 8a09cffc3..2c04afc8f 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleCastFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleCastFunctions.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; public class SimpleCastFunctions { public static final byte[] TRUE = {'t','r','u','e'}; @@ -42,7 +41,7 @@ public class SimpleCastFunctions { @Param VarCharHolder in; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } @@ -68,7 +67,7 @@ public class SimpleCastFunctions { @Output VarCharHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch b) {} + public void setup() {} public void eval() { byte[] outB = in.value == 1 ? org.apache.drill.exec.expr.fn.impl.SimpleCastFunctions.TRUE : org.apache.drill.exec.expr.fn.impl.SimpleCastFunctions.FALSE; diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleRepeatedFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleRepeatedFunctions.java index f7f0e91ba..1bfcb4539 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleRepeatedFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/SimpleRepeatedFunctions.java @@ -32,13 +32,10 @@ import org.apache.drill.exec.expr.holders.RepeatedBitHolder; import org.apache.drill.exec.expr.holders.RepeatedFloat4Holder; import org.apache.drill.exec.expr.holders.RepeatedFloat8Holder; import org.apache.drill.exec.expr.holders.RepeatedIntHolder; -import org.apache.drill.exec.expr.holders.RepeatedListHolder; -import org.apache.drill.exec.expr.holders.RepeatedMapHolder; import org.apache.drill.exec.expr.holders.RepeatedTinyIntHolder; import org.apache.drill.exec.expr.holders.RepeatedVarCharHolder; import org.apache.drill.exec.expr.holders.TinyIntHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; public class SimpleRepeatedFunctions { @@ -57,7 +54,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -72,7 +69,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -90,7 +87,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -107,7 +104,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -124,7 +121,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -140,7 +137,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -156,7 +153,7 @@ public class SimpleRepeatedFunctions { @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -170,7 +167,7 @@ public class SimpleRepeatedFunctions { @Param RepeatedIntHolder input; @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -184,7 +181,7 @@ public class SimpleRepeatedFunctions { @Param RepeatedVarCharHolder input; @Output IntHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -199,7 +196,7 @@ public class SimpleRepeatedFunctions { @Param BigIntHolder targetValue; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -221,7 +218,7 @@ public class SimpleRepeatedFunctions { @Param IntHolder targetValue; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -243,7 +240,7 @@ public class SimpleRepeatedFunctions { @Param TinyIntHolder targetValue; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -264,7 +261,7 @@ public class SimpleRepeatedFunctions { @Param BitHolder targetValue; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -286,7 +283,7 @@ public class SimpleRepeatedFunctions { @Param Float4Holder targetValue; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -308,7 +305,7 @@ public class SimpleRepeatedFunctions { @Param Float8Holder targetValue; @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { } public void eval() { @@ -332,7 +329,7 @@ public class SimpleRepeatedFunctions { @Output BitHolder out; - public void setup(RecordBatch b) { + public void setup() { currVal = new VarCharHolder(); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java index a3bc1deff..a84a776da 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java @@ -38,7 +38,6 @@ import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.NullableVarCharHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; public class StringFunctions{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(StringFunctions.class); @@ -57,7 +56,7 @@ public class StringFunctions{ @Output BitHolder out; @Workspace java.util.regex.Matcher matcher; - public void setup(RecordBatch incoming) { + public void setup() { matcher = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.RegexpUtil.sqlToRegexLike( // org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(pattern.start, pattern.end, pattern.buffer))).matcher(""); } @@ -78,7 +77,7 @@ public class StringFunctions{ @Output BitHolder out; @Workspace java.util.regex.Matcher matcher; - public void setup(RecordBatch incoming) { + public void setup() { matcher = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.RegexpUtil.sqlToRegexLike( // org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(pattern.start, pattern.end, pattern.buffer), org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(escape.start, escape.end, escape.buffer))).matcher(""); @@ -98,7 +97,7 @@ public class StringFunctions{ @Output BitHolder out; @Workspace java.util.regex.Matcher matcher; - public void setup(RecordBatch incoming) { + public void setup() { matcher = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.RegexpUtil.sqlToRegexSimilar(org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(pattern.start, pattern.end, pattern.buffer))).matcher(""); } @@ -118,7 +117,7 @@ public class StringFunctions{ @Output BitHolder out; @Workspace java.util.regex.Matcher matcher; - public void setup(RecordBatch incoming) { + public void setup() { matcher = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.RegexpUtil.sqlToRegexSimilar( org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(pattern.start, pattern.end, pattern.buffer), @@ -145,7 +144,7 @@ public class StringFunctions{ @Workspace java.util.regex.Matcher matcher; @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { matcher = java.util.regex.Pattern.compile(org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(pattern.start, pattern.end, pattern.buffer)).matcher(""); } @@ -167,7 +166,7 @@ public class StringFunctions{ @Param VarCharHolder input; @Output BigIntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = org.apache.drill.exec.expr.fn.impl.StringFunctionUtil.getUTF8CharLength(input.buffer, input.start, input.end); @@ -180,7 +179,7 @@ public class StringFunctions{ @Param VarBinaryHolder input; @Output BigIntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = org.apache.drill.exec.expr.fn.impl.StringFunctionUtil.getUTF8CharLength(input.buffer, input.start, input.end); @@ -193,7 +192,7 @@ public class StringFunctions{ @Param VarCharHolder input; @Output BigIntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = input.end - input.start; @@ -206,7 +205,7 @@ public class StringFunctions{ @Param VarCharHolder input; @Output BigIntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { out.value = (input.end - input.start) * 8; @@ -229,7 +228,7 @@ public class StringFunctions{ @Output BigIntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { //Do string match. @@ -254,7 +253,7 @@ public class StringFunctions{ @Output BigIntHolder out; - public void setup(RecordBatch incoming) {} + public void setup() {} public void eval() { //Do string match. @@ -280,7 +279,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -311,7 +310,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -346,7 +345,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Workspace ByteBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } @@ -385,7 +384,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Workspace ByteBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -423,7 +422,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Workspace ByteBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -458,7 +457,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Workspace ByteBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -500,7 +499,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -522,7 +521,7 @@ public class StringFunctions{ @Inject DrillBuf buffer; @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8000); } @@ -588,7 +587,7 @@ public class StringFunctions{ @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -661,7 +660,7 @@ public class StringFunctions{ @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -734,7 +733,7 @@ public class StringFunctions{ @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -767,7 +766,7 @@ public class StringFunctions{ @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -802,7 +801,7 @@ public class StringFunctions{ @Output VarCharHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -873,7 +872,7 @@ public class StringFunctions{ @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -900,7 +899,7 @@ public class StringFunctions{ @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -929,7 +928,7 @@ public class StringFunctions{ @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -958,7 +957,7 @@ public class StringFunctions{ @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -988,7 +987,7 @@ public class StringFunctions{ @Param VarCharHolder in; @Output VarBinaryHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.buffer = in.buffer; @@ -1008,7 +1007,7 @@ public class StringFunctions{ @Workspace Charset charset; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { charset = java.nio.charset.Charset.forName("UTF-8"); } @@ -1032,7 +1031,7 @@ public class StringFunctions{ @Param VarCharHolder in; @Output IntHolder out; - public void setup(RecordBatch incoming) { } + public void setup() { } public void eval() { out.value = in.buffer.getByte(in.start); @@ -1049,7 +1048,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Inject DrillBuf buf; - public void setup(RecordBatch incoming) { + public void setup() { buf = buf.reallocIfNeeded(1); } @@ -1072,7 +1071,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -1099,7 +1098,7 @@ public class StringFunctions{ @Workspace Charset inCharset; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { inCharset = java.nio.charset.Charset.forName(org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(enc.start, enc.end, enc.buffer)); } @@ -1127,7 +1126,7 @@ public class StringFunctions{ @Output VarCharHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertFrom.java index dc0f6b721..765270df4 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertFrom.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromBIGINT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BigIntBEConvertFrom implements DrillSimpleFunc { @@ -34,7 +33,7 @@ public class BigIntBEConvertFrom implements DrillSimpleFunc { @Output BigIntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertTo.java index e645f4bfd..07ab89add 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntBEConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toBIGINT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BigIntBEConvertTo implements DrillSimpleFunc { @@ -39,7 +38,7 @@ public class BigIntBEConvertTo implements DrillSimpleFunc { @Inject DrillBuf buffer; @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertFrom.java index 2f303c4bb..2726dd98d 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromBIGINT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BigIntConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class BigIntConvertFrom implements DrillSimpleFunc { @Output BigIntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertTo.java index 57dd2d5e1..67442c928 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toBIGINT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BigIntConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class BigIntConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertFrom.java index f3980716a..ab7d46c36 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertFrom.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromBIGINT_HADOOPV", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BigIntVLongConvertFrom implements DrillSimpleFunc { @@ -34,7 +33,7 @@ public class BigIntVLongConvertFrom implements DrillSimpleFunc { @Output BigIntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertTo.java index c647d3a35..fbc5b66d6 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BigIntVLongConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toBIGINT_HADOOPV", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BigIntVLongConvertTo implements DrillSimpleFunc { @@ -40,7 +39,7 @@ public class BigIntVLongConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { /* Hadoop Variable length integer (represented in the same way as a long) * occupies between 1-9 bytes. */ diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertFrom.java index d03c951ef..23636d55b 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromBOOLEAN_BYTE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BooleanByteConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class BooleanByteConvertFrom implements DrillSimpleFunc { @Output BitHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertTo.java index 43db659f5..f33be9361 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/BooleanByteConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.BitHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toBOOLEAN_BYTE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class BooleanByteConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class BooleanByteConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(1); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertFrom.java index c511935c2..8b88670ff 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertFrom.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.DateHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromDATE_EPOCH_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DateEpochBEConvertFrom implements DrillSimpleFunc { @@ -34,7 +33,7 @@ public class DateEpochBEConvertFrom implements DrillSimpleFunc { @Output DateHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertTo.java index 12136f3a6..8a9e1016c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochBEConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.DateHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toDATE_EPOCH_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DateEpochBEConvertTo implements DrillSimpleFunc { @@ -40,7 +39,7 @@ public class DateEpochBEConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertFrom.java index fa1c0636a..eb7ec2896 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.DateHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromDATE_EPOCH", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DateEpochConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class DateEpochConvertFrom implements DrillSimpleFunc { @Output DateHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertTo.java index bddb62172..cbaf7324c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DateEpochConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.DateHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toDATE_EPOCH", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DateEpochConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class DateEpochConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertFrom.java index 011c7a6e8..91bde9d9c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float8Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromDOUBLE_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DoubleBEConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class DoubleBEConvertFrom implements DrillSimpleFunc { @Output Float8Holder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertTo.java index 948f8b08c..1e856d10d 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleBEConvertTo.java @@ -27,7 +27,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float8Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; import javax.inject.Inject; @@ -40,7 +39,7 @@ public class DoubleBEConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertFrom.java index 1fa916622..727ccbc94 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float8Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromDOUBLE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DoubleConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class DoubleConvertFrom implements DrillSimpleFunc { @Output Float8Holder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertTo.java index 29f625e83..92a1ee230 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DoubleConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float8Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toDOUBLE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class DoubleConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class DoubleConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertFrom.java index 50e0cbb24..57a550600 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertFrom.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.FunctionTemplate.FunctionScope; import org.apache.drill.exec.expr.annotations.FunctionTemplate.NullHandling; import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; /** * This and {@link DummyConvertTo} class merely act as a placeholder so that Optiq @@ -36,7 +35,7 @@ public class DummyConvertFrom implements DrillSimpleFunc { @Output VarBinaryHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertTo.java index c2ac3efec..efee025d5 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyConvertTo.java @@ -24,7 +24,6 @@ import org.apache.drill.exec.expr.annotations.FunctionTemplate.FunctionScope; import org.apache.drill.exec.expr.annotations.FunctionTemplate.NullHandling; import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; /** * This and {@link DummyConvertFrom} class merely act as a placeholder so that Optiq @@ -36,7 +35,7 @@ public class DummyConvertTo implements DrillSimpleFunc { @Output VarBinaryHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyFlatten.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyFlatten.java index d4e3115fe..7b0dfd423 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyFlatten.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/DummyFlatten.java @@ -23,8 +23,6 @@ import org.apache.drill.exec.expr.annotations.FunctionTemplate; import org.apache.drill.exec.expr.annotations.FunctionTemplate.FunctionScope; import org.apache.drill.exec.expr.annotations.FunctionTemplate.NullHandling; import org.apache.drill.exec.expr.annotations.Output; -import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; import org.apache.drill.exec.vector.complex.writer.BaseWriter; /** @@ -37,7 +35,7 @@ public class DummyFlatten implements DrillSimpleFunc { @Output BaseWriter.ComplexWriter out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertFrom.java index 095588cd6..a4cb62798 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float4Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromFLOAT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class FloatBEConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class FloatBEConvertFrom implements DrillSimpleFunc { @Output Float4Holder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertTo.java index 4b6d51de8..e978e3fd1 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatBEConvertTo.java @@ -27,7 +27,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float4Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; import javax.inject.Inject; @@ -40,7 +39,7 @@ public class FloatBEConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(4); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertFrom.java index 4ed553bca..04ffa86cf 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float4Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromFLOAT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class FloatConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class FloatConvertFrom implements DrillSimpleFunc { @Output Float4Holder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertTo.java index 3cce965ad..88c2a3e01 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/FloatConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Float4Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toFLOAT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class FloatConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class FloatConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(4); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertFrom.java index 969adde64..177ae52f0 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertFrom.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromINT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class IntBEConvertFrom implements DrillSimpleFunc { @@ -34,7 +33,7 @@ public class IntBEConvertFrom implements DrillSimpleFunc { @Output IntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertTo.java index 02ee8e22f..ba0883dea 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntBEConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toINT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class IntBEConvertTo implements DrillSimpleFunc { @@ -40,7 +39,7 @@ public class IntBEConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(4); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertFrom.java index 9948e7a06..831b96ab8 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromINT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class IntConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class IntConvertFrom implements DrillSimpleFunc { @Output IntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertTo.java index 4dd1ef497..b257b1325 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toINT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class IntConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class IntConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(4); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertFrom.java index 0cf729f6c..0b1276c38 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertFrom.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromINT_HADOOPV", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class IntVIntConvertFrom implements DrillSimpleFunc { @@ -34,7 +33,7 @@ public class IntVIntConvertFrom implements DrillSimpleFunc { @Output IntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertTo.java index 715c72d0e..b7b3d02f5 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/IntVIntConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.IntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toINT_HADOOPV", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class IntVIntConvertTo implements DrillSimpleFunc { @@ -40,7 +39,7 @@ public class IntVIntConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { /* Hadoop Variable length integer (represented in the same way as a long) * occupies between 1-9 bytes. */ diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertFrom.java index eb788f385..c828cf420 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertFrom.java @@ -32,7 +32,6 @@ import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.VarBinaryHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; import org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter; public class JsonConvertFrom { @@ -50,7 +49,7 @@ public class JsonConvertFrom { @Output ComplexWriter writer; - public void setup(RecordBatch incoming){ + public void setup(){ jsonReader = new org.apache.drill.exec.vector.complex.fn.JsonReader(buffer, false); } @@ -76,7 +75,7 @@ public class JsonConvertFrom { @Output ComplexWriter writer; - public void setup(RecordBatch incoming){ + public void setup(){ jsonReader = new org.apache.drill.exec.vector.complex.fn.JsonReader(buffer, false); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java index 7f7d6f255..ccfae1487 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/JsonConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.FunctionTemplate.NullHandling; import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; import org.apache.drill.exec.vector.complex.reader.FieldReader; public class JsonConvertTo { @@ -45,7 +44,7 @@ public class JsonConvertTo { @Output VarBinaryHolder out; @Inject DrillBuf buffer; - public void setup(RecordBatch incoming){ + public void setup(){ } public void eval(){ diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertFrom.java index 1f2257545..afef69470 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.SmallIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromSMALLINT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class SmallIntBEConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class SmallIntBEConvertFrom implements DrillSimpleFunc { @Output SmallIntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertTo.java index b1620e61c..35c1cd88f 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntBEConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.SmallIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toSMALLINT_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class SmallIntBEConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class SmallIntBEConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(2); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertFrom.java index 463ec3512..d20a160cd 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.SmallIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromSMALLINT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class SmallIntConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class SmallIntConvertFrom implements DrillSimpleFunc { @Output SmallIntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertTo.java index 2cdaafbb1..dbe98fc89 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/SmallIntConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.SmallIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toSMALLINT", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class SmallIntConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class SmallIntConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(2); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertFrom.java index 7aee12d31..59bb76224 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertFrom.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.TimeHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromTIME_EPOCH_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class TimeEpochBEConvertFrom implements DrillSimpleFunc { @@ -34,7 +33,7 @@ public class TimeEpochBEConvertFrom implements DrillSimpleFunc { @Output TimeHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertTo.java index bbd75a612..e05ca1f55 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochBEConvertTo.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.TimeHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toTIME_EPOCH_BE", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class TimeEpochBEConvertTo implements DrillSimpleFunc { @@ -40,7 +39,7 @@ public class TimeEpochBEConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertFrom.java index 9fb272b72..97e6870da 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.TimeHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromTIME_EPOCH", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class TimeEpochConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class TimeEpochConvertFrom implements DrillSimpleFunc { @Output TimeHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertTo.java index c9baad331..baa16b7f6 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TimeEpochConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.TimeHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toTIME_EPOCH", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class TimeEpochConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class TimeEpochConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertFrom.java index 4380c136f..750eb9545 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.TinyIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(names = {"convert_fromTINYINT", "convert_fromTINYINT_BE"}, scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) @@ -36,7 +35,7 @@ public class TinyIntConvertFrom implements DrillSimpleFunc { @Output TinyIntHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertTo.java index 3abde4f4a..040fa609b 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/TinyIntConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.TinyIntHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(names = {"convert_toTINYINT", "convert_toTINYINT_BE"}, scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) @@ -42,7 +41,7 @@ public class TinyIntConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(1); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertFrom.java index dab73a716..0f607d368 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.UInt8Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromUINT8", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class UInt8ConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class UInt8ConvertFrom implements DrillSimpleFunc { @Output UInt8Holder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertTo.java index 904151f02..ab387efde 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UInt8ConvertTo.java @@ -30,7 +30,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.UInt8Holder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toUINT8", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class UInt8ConvertTo implements DrillSimpleFunc { @@ -41,7 +40,7 @@ public class UInt8ConvertTo implements DrillSimpleFunc { @Override - public void setup(RecordBatch incoming) { + public void setup() { buffer = buffer.reallocIfNeeded(8); } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertFrom.java index 82562c83e..4d46e5b36 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Var16CharHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromUTF16", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class UTF16ConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class UTF16ConvertFrom implements DrillSimpleFunc { @Output Var16CharHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertTo.java index cff1851cb..a7797ca62 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF16ConvertTo.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.Var16CharHolder; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toUTF16", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class UTF16ConvertTo implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class UTF16ConvertTo implements DrillSimpleFunc { @Output VarBinaryHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertFrom.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertFrom.java index a6f8901d2..ceabaa373 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertFrom.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertFrom.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.VarBinaryHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_fromUTF8", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class UTF8ConvertFrom implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class UTF8ConvertFrom implements DrillSimpleFunc { @Output VarCharHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertTo.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertTo.java index 093d6b91f..5b1123df5 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertTo.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/conv/UTF8ConvertTo.java @@ -26,7 +26,6 @@ import org.apache.drill.exec.expr.annotations.Output; import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.holders.VarBinaryHolder; import org.apache.drill.exec.expr.holders.VarCharHolder; -import org.apache.drill.exec.record.RecordBatch; @FunctionTemplate(name = "convert_toUTF8", scope = FunctionScope.SIMPLE, nulls = NullHandling.NULL_IF_NULL) public class UTF8ConvertTo implements DrillSimpleFunc { @@ -35,7 +34,7 @@ public class UTF8ConvertTo implements DrillSimpleFunc { @Output VarBinaryHolder out; @Override - public void setup(RecordBatch incoming) { } + public void setup() { } @Override public void eval() { diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/GeneratorFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/GeneratorFunctions.java index a9c244a36..087595b34 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/GeneratorFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/GeneratorFunctions.java @@ -28,7 +28,6 @@ import org.apache.drill.exec.expr.annotations.Param; import org.apache.drill.exec.expr.annotations.Workspace; import org.apache.drill.exec.expr.holders.BigIntHolder; import org.apache.drill.exec.expr.holders.Float8Holder; -import org.apache.drill.exec.record.RecordBatch; public class GeneratorFunctions extends ExecTest { @@ -42,7 +41,7 @@ public class GeneratorFunctions extends ExecTest { @Workspace long current; @Output BigIntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { current = 0; } @@ -58,7 +57,7 @@ public class GeneratorFunctions extends ExecTest { @Param BigIntHolder range; @Output BigIntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -74,7 +73,7 @@ public class GeneratorFunctions extends ExecTest { @Param BigIntHolder max; @Output BigIntHolder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -90,7 +89,7 @@ public class GeneratorFunctions extends ExecTest { @Output Float8Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { @@ -106,7 +105,7 @@ public class GeneratorFunctions extends ExecTest { @Param BigIntHolder max; @Output Float8Holder out; - public void setup(RecordBatch incoming) { + public void setup() { } public void eval() { |