[
https://issues.apache.org/jira/browse/DRILL-6340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16514651#comment-16514651
]
ASF GitHub Bot commented on DRILL-6340:
---------------------------------------
Ben-Zvi commented on a change in pull request #1302: DRILL-6340: Output Batch
Control in Project using the RecordBatchSizer
URL: https://github.com/apache/drill/pull/1302#discussion_r195889942
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/expr/annotations/FunctionTemplate.java
##########
@@ -88,6 +90,38 @@
boolean isNiladic() default false;
boolean checkPrecisionRange() default false;
+ /**
+ * This enum will be used to estimate the average size of the output
+ * produced by a function that produces variable length output
+ */
+ public enum OutputWidthCalculatorType {
+ DEFAULT(OutputWidthCalculators.DefaultOutputWidthCalculator.INSTANCE),
+ CLONE(OutputWidthCalculators.CloneOutputWidthCalculator.INSTANCE),
+ CONCAT(OutputWidthCalculators.ConcatOutputWidthCalculator.INSTANCE),
+ // Custom calculator are required for functions that don't fall in to any
pre-defined
+ // calculator categories - like replace and lpad
+ // place holder markers on functions until support
+ // for CUSTOM calculators is implemented
+ // CUSTOM_FIXED_WIDTH_DEFUALT will default to a fixed size - for functions
like
+ // lpad() where the ouput size does not easily map to the input size
+
CUSTOM_FIXED_WIDTH_DEFUALT(OutputWidthCalculators.DefaultOutputWidthCalculator.INSTANCE),
+ // CUSTOM CLONE will default to CLONE - for functions like replace() where
the output
+ // size does not easily map to the input size but is likely to be at most
the size of the input.
+
CUSTOM_CLONE_DEFAULT(OutputWidthCalculators.CloneOutputWidthCalculator.INSTANCE);
+ OutputWidthCalculator outputWidthCalculator;
+
+ OutputWidthCalculatorType(OutputWidthCalculator outputWidthCalculator) {
+ this.outputWidthCalculator = outputWidthCalculator;
+ }
+
+ public OutputWidthCalculator getOutputWidthCalculator() { return
outputWidthCalculator; }
+ }
+
+ OutputWidthCalculatorType outputWidthCalculatorType() default
OutputWidthCalculatorType.DEFAULT;
+
+ int VARIABLE_OUTPUT_SIZE_ESTIMATE_DEFAULT = -1;
+ int variableOutputSizeEstimate() default
VARIABLE_OUTPUT_SIZE_ESTIMATE_DEFAULT;
Review comment:
Is this name appropriate ? The name starts with "variable", but it also
covers the "fixed" cases. Maybe should change to just "outputSizeEstimate" ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Output Batch Control in Project using the RecordBatchSizer
> ----------------------------------------------------------
>
> Key: DRILL-6340
> URL: https://issues.apache.org/jira/browse/DRILL-6340
> Project: Apache Drill
> Issue Type: Improvement
> Components: Execution - Relational Operators
> Reporter: Karthikeyan Manivannan
> Assignee: Karthikeyan Manivannan
> Priority: Major
> Labels: doc-impacting
> Fix For: 1.14.0
>
>
> This bug is for tracking the changes required to implement Output Batch
> Sizing in Project using the RecordBatchSizer. The challenge in doing this
> mainly lies in dealing with expressions that produce variable-length columns.
> The following doc talks about some of the design approaches for dealing with
> such variable-length columns.
> [https://docs.google.com/document/d/1h0WsQsen6xqqAyyYSrtiAniQpVZGmQNQqC1I2DJaxAA/edit?usp=sharing]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)