[jira] [Commented] (CALCITE-3166) Make RelBuilder configurable

2019-07-01 Thread Danny Chan (JIRA)


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

Danny Chan commented on CALCITE-3166:
-

Thanks [~julianhyde], i'm ok with this Context unwrap, cause it seems like a 
code refactoring.

> Make RelBuilder configurable
> 
>
> Key: CALCITE-3166
> URL: https://issues.apache.org/jira/browse/CALCITE-3166
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Julian Hyde
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.21.0
>
>
> Make {{RelBuilder}} configurable, so that particular optimizations can easily 
> be turned off.
> I propose to add a class {{RelBuilder.Config}}, which is immutable and has a 
> public final field for each configuration property; also a class 
> {{RelBuilder.ConfigBuilder}} to create a config.
> {{RelBuilder.create(FrameworkConfig frameworkConfig)}} will get a config by 
> calling {{frameworkConfig.getContext().unwrap(RelBuilder.Config.class)}}.



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


[jira] [Commented] (CALCITE-3166) Make RelBuilder configurable

2019-07-01 Thread Julian Hyde (JIRA)


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

Julian Hyde commented on CALCITE-3166:
--

{quote}Does this mean we should always make a {{RelBuilder.Config}} instance 
into the {{Context}} now ? This api seems not that concise to use.{quote}

The constructor for {{RelBuilder}} takes a {{Context}}, and i don't want to add 
other constructors. I don't expect people to need to customize 
{{RelBuilder.Config}} very often, so the API doesn't need to be concise. The 
main use case is to disable features because of bugs. We shouldn't be putting 
features into {{RelBuilder}} that are not globally applicable. If there are 
optional features - e.g. whether to decorrelate a sub-query - they are better 
packaged as rules.

> Make RelBuilder configurable
> 
>
> Key: CALCITE-3166
> URL: https://issues.apache.org/jira/browse/CALCITE-3166
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Julian Hyde
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.21.0
>
>
> Make {{RelBuilder}} configurable, so that particular optimizations can easily 
> be turned off.
> I propose to add a class {{RelBuilder.Config}}, which is immutable and has a 
> public final field for each configuration property; also a class 
> {{RelBuilder.ConfigBuilder}} to create a config.
> {{RelBuilder.create(FrameworkConfig frameworkConfig)}} will get a config by 
> calling {{frameworkConfig.getContext().unwrap(RelBuilder.Config.class)}}.



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


[jira] [Commented] (CALCITE-3166) Make RelBuilder configurable

2019-07-01 Thread Danny Chan (JIRA)


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

Danny Chan commented on CALCITE-3166:
-

Reviewed and left some comments.

> Make RelBuilder configurable
> 
>
> Key: CALCITE-3166
> URL: https://issues.apache.org/jira/browse/CALCITE-3166
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Julian Hyde
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.21.0
>
>
> Make {{RelBuilder}} configurable, so that particular optimizations can easily 
> be turned off.
> I propose to add a class {{RelBuilder.Config}}, which is immutable and has a 
> public final field for each configuration property; also a class 
> {{RelBuilder.ConfigBuilder}} to create a config.
> {{RelBuilder.create(FrameworkConfig frameworkConfig)}} will get a config by 
> calling {{frameworkConfig.getContext().unwrap(RelBuilder.Config.class)}}.



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


[jira] [Commented] (CALCITE-3166) Make RelBuilder configurable

2019-07-01 Thread Julian Hyde (JIRA)


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

Julian Hyde commented on CALCITE-3166:
--

Can someone please review 
https://github.com/julianhyde/calcite/tree/3166-relBuilder-config.

> Make RelBuilder configurable
> 
>
> Key: CALCITE-3166
> URL: https://issues.apache.org/jira/browse/CALCITE-3166
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Julian Hyde
>Priority: Major
>
> Make {{RelBuilder}} configurable, so that particular optimizations can easily 
> be turned off.
> I propose to add a class {{RelBuilder.Config}}, which is immutable and has a 
> public final field for each configuration property; also a class 
> {{RelBuilder.ConfigBuilder}} to create a config.
> {{RelBuilder.create(FrameworkConfig frameworkConfig)}} will get a config by 
> calling {{frameworkConfig.getContext().unwrap(RelBuilder.Config.class)}}.



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