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

Julian Hyde commented on CALCITE-3730:
--------------------------------------

I had a different idea, which would prevent major changes to the RelBuilder 
API, and would also prevent people having to specify hints when they are not 
interested in hints.

Your proposed change would write
{code:java}
RelBuilder b;
List<RelHint> hints;
b.scan("EMP", hints)
  .project(b.field("EMPNO"), ImmutableList.of());{code}
I propose instead
{code:java}
RelBuilder b;
List<RelHint> hints;
b.scan("EMP")
 .hints(hints)
 .project(b.field("EMPNO"));{code}
I propose a new method {{RelBuilder RelBuilder.hints(Iterable<? extends 
RelHint> hints)}} that pops a {{RelNode}} off the stack, add hints, and pushes 
it back on the stack. People who care about hints can use that method, but 
everyone else will be unaffected.

> Add hints to RelBuilder
> -----------------------
>
>                 Key: CALCITE-3730
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3730
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 1.22.0
>            Reporter: Danny Chen
>            Assignee: Danny Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to