You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2017/02/21 22:40:44 UTC

[jira] [Resolved] (DRILL-5103) External Sort pop shadows variable "initialAllocation" from AbstractBase

     [ https://issues.apache.org/jira/browse/DRILL-5103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Rogers resolved DRILL-5103.
--------------------------------
    Resolution: Fixed

> External Sort pop shadows variable "initialAllocation" from AbstractBase
> ------------------------------------------------------------------------
>
>                 Key: DRILL-5103
>                 URL: https://issues.apache.org/jira/browse/DRILL-5103
>             Project: Apache Drill
>          Issue Type: Sub-task
>    Affects Versions: 1.8.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>
> The Physical Operator (pop) definition for External sort contains the following:
> {code}
> public class ExternalSort extends Sort {
>   private long initialAllocation = 20000000;
> {code}
> But,
> {code}
> public abstract class AbstractBase implements PhysicalOperator{
>   protected long initialAllocation = 1000000L;
> {code}
> The result is that the variable in {{ExternalSort}} shadows the one in {{AbstractBase}}. Jackson deserialization sets the one in {{AbstractBase}}, but the method {{getInitialAllocation()}} returns the shadowed one in {{ExternalSort}}.
> Remove the shadowed {{initialAllocation}} from {{ExternalSort}} and move the initializer into the constructor.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)