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

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

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.22.0
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            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

                Slack

                  Issue deployment