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

Jacques Nadeau commented on DRILL-3876:
---------------------------------------

My question was about the critical path.

If you're only trying to solve:

 select a, flatten(b), 

that is far more trivial than:

select a, flatten(flatten(b))
AND
select flatten(a), flatten(b)

I'm calling the latter cases "multiflatten". Are you only trying to prune 
multicopy in the first case (single flatten) or in both cases?

If single flatten, I'd suggest that we enhance the flatten operation definition 
to include carrying fields. In this case, we only support simple projections 
(RexInputRef in Calcite's verbiage). Then we can update the rule to add the 
carrying fields (focused on the single flatten case). Lastly, we can update 
flatten so that it only copies columns in the carrying list. Do you want to 
talk through in more detail in a hangout?

> flatten() should not require a subsequent project to strip columns that 
> aren't required
> ---------------------------------------------------------------------------------------
>
>                 Key: DRILL-3876
>                 URL: https://issues.apache.org/jira/browse/DRILL-3876
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>            Reporter: Chris Westin
>            Assignee: Chris Westin
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to