You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2019/10/24 23:30:00 UTC

[jira] [Resolved] (CALCITE-3436) In CalciteConnectionConfigImpl, add "isSet" and "unset" methods

     [ https://issues.apache.org/jira/browse/CALCITE-3436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-3436.
----------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Fixed in [2c6ccd50|https://github.com/apache/calcite/commit/2c6ccd50ec90e14c1320c8f049a08c4b5de515fa]; thanks for the PR, [~fib-seq]!

> In CalciteConnectionConfigImpl, add "isSet" and "unset" methods
> ---------------------------------------------------------------
>
>                 Key: CALCITE-3436
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3436
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Ryan Fu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently the "set" method in {{CalciteConnectionConfigImpl}} has no effect if the property is already set, and most people would find that behavior surprising.
> This change adds "isSet" and "unset" methods, and restores "set" to the obvious behavior. If you want to set conditionally, you can check "isSet" first.
> Using {{isSet}}, {{Planner.connConfig()}} is now able to merge parser config and connection config in the way that you would expect. A property value in parser config will override connection config only if the corresponding property in connection config is not set.
> The code in {{CalciteConnectionConfigImpl.set}} previously called {{new Properties(properties)}} (whose behavior is a little confusing, because it sets defaults) and now calls {{Properties.clone()}} (which is more straightforward).



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