Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3436

In CalciteConnectionConfigImpl, add "isSet" and "unset" methods

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.22.0
    • Component/s: None

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fib-seq Ryan Fu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m