Ben-Zvi commented on a change in pull request #1442: DRILL-6688 Data batches
for Project operator exceed the maximum specified
URL: https://github.com/apache/drill/pull/1442#discussion_r212761189
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/OutputWidthVisitor.java
##########
@@ -270,8 +270,10 @@ public OutputWidthExpression
visitIfElseWidthExpr(IfElseWidthExpr ifElseWidthExp
private OutputWidthExpression getFixedLenExpr(MajorType majorType) {
MajorType type = majorType;
if (Types.isFixedWidthType(type)) {
- int fixedWidth =
ProjectMemoryManager.getWidthOfFixedWidthType(type);
- return new OutputWidthExpression.FixedLenExpr(fixedWidth);
+ // Use only the width of the data. Metadata width will be
accounted for at the end
+ // This is to avoid using metadata size in intermediate
calculations
+ int fixedDataWidth =
ProjectMemoryManager.getDataWidthOfFixedWidthType(type);
Review comment:
Since here we're guaranteed to get a fixed with type, we could just call
TypeHelper.getSize() and eliminate getDataWidthOfFixedWidthType() . This does
not address the MinorType.NULL case, which is not clear how we get there ...
----------------------------------------------------------------
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]
With regards,
Apache Git Services