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

Jason Altekruse edited comment on CALCITE-978 at 1/12/16 3:46 PM:
------------------------------------------------------------------

I would like to make the solution general, but I'm not sure that this will work 
in this case. I do not believe the  RelDataType contains enough information to 
produce the transformation that we want inside the context of the current rule, 
as it transforms the entire current section of the plan into the return of the 
{{values}} builder method. We want to include the entire input subtree, as we 
need to preserve the scan of a specific source (as well as potentially as 
series of other operations before the constant "false" filter, where the schema 
will propagate through each one).


was (Author: jaltekruse):
I would like to make the solution general, but I'm not sure that this will work 
in this case. I do not believe the  RelDataType contains enough information to 
produce the transformation that we want inside the context of the current rule, 
as it transforms the entire current section of the plan into the return of the 
{{monospaced}}values{{monospaced}} builder method. We want to include the 
entire input subtree, as we need to preserve the scan of a specific source (as 
well as potentially as series of other operations before the constant "false" 
filter, where the schema will propagate through each one).

> Make ReduceExpressionsRule extensible to transform false filter in 
> schema-on-read case 
> ---------------------------------------------------------------------------------------
>
>                 Key: CALCITE-978
>                 URL: https://issues.apache.org/jira/browse/CALCITE-978
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Jason Altekruse
>              Labels: drill
>
> This comes from a commit in Drill's forked Calcite 
> (https://github.com/dremio/calcite/commit/a29f007f4f4017368b6f41bf8c3aba4490a1cee8).
> ReduceExpressionRule will transform a false filter into VALUES with empty 
> input. This only works in the case of schema-aware scenario.  In 
> schema-on-read scenario like Drill, VALUES would not provide the schema type 
> at the planning time; schema has to be propagate during execution time.
> We should allow ReduceExpressionRule extensible so that different behavior 
> would be allowed to handle false filter in both schema-aware case and 
> schema-on-read case.



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

Reply via email to