[ 
https://issues.apache.org/jira/browse/DRILL-6373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510489#comment-16510489
 ] 

ASF GitHub Bot commented on DRILL-6373:
---------------------------------------

paul-rogers commented on issue #1244: DRILL-6373: Refactor Result Set Loader 
for Union, List support
URL: https://github.com/apache/drill/pull/1244#issuecomment-396781670
 
 
   The specific fix proposal must reflect that the code doing the copying is 
generated:
   
   ```
           at 
org.apache.drill.exec.expr.BasicTypeHelper.getNewVector(BasicTypeHelper.java:1261)
 ~[vector-1.14.0-SNAPSHOT.jar:1.14.0-SNAPSHOT]
           at 
org.apache.drill.exec.test.generated.PartitionerGen33655$OutgoingRecordBatch.initializeBatch(PartitionerTemplate.java:381)
 ~[na:na]
   ```
   
   So, one choice is to create a new method, `duplicateVector` that 1) clones 
the `MaterializedField` and 2) calls `getNewVector`. Then we change the 
generated code in the partitioner to call the new method.
   
   The other choice is to create a `newVector()` method that does what 
`getNewVector()` does now, and to revise `getNewVector()` to do the clone. We 
could then review all uses of `getNewVector()` to determine if we should use 
the non-cloning `newVector()` instead. This forces us to think about which is 
needed in each case, but forces generated code to use the "most safe" path.
   
   Thoughts @vrozov? 

----------------------------------------------------------------
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:
us...@infra.apache.org


> Refactor the Result Set Loader to prepare for Union, List support
> -----------------------------------------------------------------
>
>                 Key: DRILL-6373
>                 URL: https://issues.apache.org/jira/browse/DRILL-6373
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.13.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Major
>             Fix For: 1.14.0
>
>
> As the next step in merging the "batch sizing" enhancements, refactor the 
> {{ResultSetLoader}} and related classes to prepare for Union and List 
> support. This fix follows the refactoring of the column accessors for the 
> same purpose. Actual Union and List support is to follow in a separate PR.



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

Reply via email to