[jira] [Updated] (DRILL-5954) ListVector shadows "offsets" from BaseRepeatedValueVector

2018-06-12 Thread Pritesh Maker (JIRA)


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

Pritesh Maker updated DRILL-5954:
-
Fix Version/s: (was: 1.14.0)

> ListVector shadows "offsets" from BaseRepeatedValueVector
> -
>
> Key: DRILL-5954
> URL: https://issues.apache.org/jira/browse/DRILL-5954
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.8.0
>Reporter: Paul Rogers
>Assignee: Paul Rogers
>Priority: Minor
>
> The Drill vector class {{ListVector}} derives from 
> {{BaseRepeatedValueVector}}:
> {code}
> public class ListVector extends BaseRepeatedValueVector {
>   private UInt4Vector offsets;
> ...
> {code}
> Note that the {{offsets}} member shadows a member of the same type in the 
> super class:
> {code}
> public abstract class BaseRepeatedValueVector ... {
>   protected final UInt4Vector offsets;
> ...
> {code}
> In Java, shadowing an existing field is considered bad practice as it is 
> never clear which field any particular bit of code references.
> In this case, it appears to be that the {{ListVector}} version is simply a 
> reference to the base class version. Perhaps because someone didn't 
> understand {{protected}} mode in Java?
> {code}
>   public ListVector(MaterializedField field, BufferAllocator allocator, 
> CallBack callBack) {
> ...
> offsets = getOffsetVector();
> ...
> {code}
> A quick experiment shows that the {{ListVector}} version can simply be 
> removed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (DRILL-5954) ListVector shadows "offsets" from BaseRepeatedValueVector

2018-03-06 Thread Pritesh Maker (JIRA)

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

Pritesh Maker updated DRILL-5954:
-
Fix Version/s: (was: 1.13.0)
   1.14.0

> ListVector shadows "offsets" from BaseRepeatedValueVector
> -
>
> Key: DRILL-5954
> URL: https://issues.apache.org/jira/browse/DRILL-5954
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.8.0
>Reporter: Paul Rogers
>Assignee: Paul Rogers
>Priority: Minor
> Fix For: 1.14.0
>
>
> The Drill vector class {{ListVector}} derives from 
> {{BaseRepeatedValueVector}}:
> {code}
> public class ListVector extends BaseRepeatedValueVector {
>   private UInt4Vector offsets;
> ...
> {code}
> Note that the {{offsets}} member shadows a member of the same type in the 
> super class:
> {code}
> public abstract class BaseRepeatedValueVector ... {
>   protected final UInt4Vector offsets;
> ...
> {code}
> In Java, shadowing an existing field is considered bad practice as it is 
> never clear which field any particular bit of code references.
> In this case, it appears to be that the {{ListVector}} version is simply a 
> reference to the base class version. Perhaps because someone didn't 
> understand {{protected}} mode in Java?
> {code}
>   public ListVector(MaterializedField field, BufferAllocator allocator, 
> CallBack callBack) {
> ...
> offsets = getOffsetVector();
> ...
> {code}
> A quick experiment shows that the {{ListVector}} version can simply be 
> removed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (DRILL-5954) ListVector shadows "offsets" from BaseRepeatedValueVector

2017-11-13 Thread Paul Rogers (JIRA)

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

Paul Rogers updated DRILL-5954:
---
Summary: ListVector shadows "offsets" from BaseRepeatedValueVector  (was: 
ListVector derives from BaseRepeatedValueVector, shadows offsets)

> ListVector shadows "offsets" from BaseRepeatedValueVector
> -
>
> Key: DRILL-5954
> URL: https://issues.apache.org/jira/browse/DRILL-5954
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.8.0
>Reporter: Paul Rogers
>Assignee: Paul Rogers
>Priority: Minor
> Fix For: 1.13.0
>
>
> The Drill vector class {{ListVector}} derives from 
> {{BaseRepeatedValueVector}}:
> {code}
> public class ListVector extends BaseRepeatedValueVector {
>   private UInt4Vector offsets;
> ...
> {code}
> Note that the {{offsets}} member shadows a member of the same type in the 
> super class:
> {code}
> public abstract class BaseRepeatedValueVector ... {
>   protected final UInt4Vector offsets;
> ...
> {code}
> In Java, shadowing an existing field is considered bad practice as it is 
> never clear which field any particular bit of code references.
> In this case, it appears to be that the {{ListVector}} version is simply a 
> reference to the base class version. Perhaps because someone didn't 
> understand {{protected}} mode in Java?
> {code}
>   public ListVector(MaterializedField field, BufferAllocator allocator, 
> CallBack callBack) {
> ...
> offsets = getOffsetVector();
> ...
> {code}
> A quick experiment shows that the {{ListVector}} version can simply be 
> removed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)