You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Hanifi Gunes (JIRA)" <ji...@apache.org> on 2014/12/16 20:25:13 UTC
[jira] [Commented] (DRILL-1875) VectorContainder.getTransferClone()
doesn't seem to handle ignoreWrappers properly
[ https://issues.apache.org/jira/browse/DRILL-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14248747#comment-14248747 ]
Hanifi Gunes commented on DRILL-1875:
-------------------------------------
Wouldn't that make sense to use a dataset that support constant time look ups instead of iterating over array?
> VectorContainder.getTransferClone() doesn't seem to handle ignoreWrappers properly
> ----------------------------------------------------------------------------------
>
> Key: DRILL-1875
> URL: https://issues.apache.org/jira/browse/DRILL-1875
> Project: Apache Drill
> Issue Type: Task
> Reporter: Deneche A. Hakim
> Assignee: Timothy Chen
> Priority: Critical
>
> Looking at org.apache.drill.exec.record.VectorContainer:
> {code}
> public static VectorContainer getTransferClone(VectorAccessible incoming, VectorWrapper[] ignoreWrappers) {
> VectorContainer vc = new VectorContainer();
> for (VectorWrapper<?> w : incoming) {
> if(ignoreWrappers != null) {
> for(VectorWrapper wrapper : ignoreWrappers) {
> if (w == wrapper) {
> continue;
> }
> }
> }
> vc.cloneAndTransfer(w);
> }
> return vc;
> }
> {code}
> The inner loop doesn't seem to do anything. Shouldn't the continue statement actually continue the outer loop instead ? like this:
> {code}
> outerloop:
> for (VectorWrapper<?> w : incoming) {
> if(ignoreWrappers != null) {
> for(VectorWrapper wrapper : ignoreWrappers) {
> if (w == wrapper) {
> continue outerloop;
> }
> }
> }
> vc.cloneAndTransfer(w);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)