Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3542

Scale assignment optimization

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.11.0
    • 1.11.1, 1.12.0
    • None

    Description

      Changed string in the function: make_avsc_object (from the file "schema.py"):
      scale = 0 if json_data.get("scale") is None else json_data.get("scale") -> scale = json_data.get("scale", 0)
       
      By Python documentation:
      get(self, key, default=None, /)
          Return the value for key if key is in the dictionary, else default.
       
      It is more effective and readable than previous version.

      Attachments

        Activity

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

          People

            izveigor Igor Izvekov
            izveigor Igor Izvekov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 40m
                40m

                Slack

                  Issue deployment